Skip to content

Publisher

Publisher #521

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/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvm'
- run: npm install
- run: node index.js
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/configure-pages@v2
- uses: actions/upload-pages-artifact@v1
with:
path: public
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1