This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 143
84 lines (68 loc) · 2.26 KB
/
pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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
# 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://5etools-mirror-2.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
- 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