Skip to content

Publisher

Publisher #822

Workflow file for this run

name: Publisher
on:
push:
schedule:
- cron: 0 2 * * *
workflow_dispatch:
permissions:
contents: read
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version-file: '.nvm'
- run: npm install
- run: |
for i in {1..3}; do
node index.js get-all -w ./public/repos.json && break
if [ $i -eq 3 ]; then exit 1; fi
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: tar -cf public.tar ./public
- uses: actions/[email protected]
with:
name: public.tar
path: public.tar
publish:
if: github.ref == 'refs/heads/master'
permissions:
contents: read
pages: write
id-token: write
needs:
- build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
name: public.tar
- run: tar -xf public.tar
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
path: public
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]