Skip to content

v2.0.1

v2.0.1 #5

Workflow file for this run

name: Build and Deploy Pages
on:
push:
tags:
- 'v**'
# Allow running manually from the actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set Deployed Flag and Image Root
run: |
bash ./.github/set-deployed-flag.sh ${{ github.ref_name }}
bash ./.github/set-img-root.sh ${{ github.repository_owner }}
# Notably: remove anything which should not be added to the service worker manifest:
# - `homebrew`
# - `prerelease`
- name: Cleanup
run: |
rm -rf *.md *.zip scss spellcheck homebrew prerelease
ls -lah
# Remove entries from the `.gitignore` so the gh-pages action can correctly add+commit them to the pages branch
- name: Build Service Worker
run: |
node --version
npm --version
npm i
npm run build:sw:prod
sed -i 's/sw.js//g' .gitignore
sed -i 's/sw-injector.js//g' .gitignore
- name: Build SEO Pages
env:
VET_SEO_IS_DEV_MODE: true
VET_BASE_SITE_URL: "https://${{ github.repository_owner }}.github.io/"
VET_SEO_IS_SKIP_UA_ETC: true
run: |
npm run build:seo -- ${{ github.ref_name }}
- name: Cleanup
run: |
rm -rf node_modules node
ls -lah
# TODO(Future)
# - name: Setup Pages
# uses: actions/configure-pages@master
#
# - name: Upload artifact
# uses: actions/upload-pages-artifact@master
# with:
# path: '.'
#
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@master
# with:
# # Timeout in millis (10 mins)
# timeout: 600000