Skip to content

GitHub Pages

GitHub Pages #295

Workflow file for this run

name: GitHub Pages
on:
push:
branches:
- master
workflow_call:
workflow_dispatch:
repository_dispatch:
types:
- on-demand-build
schedule:
- cron: "51 4 * * *"
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: gh-pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
ref: master # Explicitly checkout master, since the ref may be updated within the caller workflows
submodules: recursive
- uses: actions/cache@v3
with:
key: v3-${{ hashFiles('package-lock.json') }}-${{ hashFiles('elm.json') }}
restore-keys: |
v3-${{ hashFiles('package-lock.json') }}-
v3-
path: |
node_modules/
elm-stuff/
.elm-pages/
~/.elm
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm ci
- run: npm run build
timeout-minutes: 30
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MICROCMS_API_KEY: ${{ secrets.MICROCMS_API_KEY }}
TWILOG_SEARCH_API_KEY: ${{ secrets.TWILOG_SEARCH_API_KEY }}
AMAZON_ASSOCIATE_TAG: ${{ secrets.AMAZON_ASSOCIATE_TAG }}
- uses: actions/upload-pages-artifact@v1
with:
path: ./dist
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-20.04
steps:
- uses: actions/deploy-pages@v2
id: deployment