Deploy to GitHub Pages #568
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
permissions: | |
contents: write | |
on: | |
schedule: | |
- cron: "0 1 * * *" # Runs at 1 AM every day | |
push: | |
branches: | |
- main # replace with your default branch name | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14.x] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build and export project | |
run: | | |
npm run build | |
npm run export | |
touch out/.nojekyll | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: out | |
token: ${{ secrets.GITHUB_TOKEN }} | |
fqdn: ${{ secrets.FQDN }} |