forked from mattlogic6/mallen5e.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (68 loc) · 2.34 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: Clear Cache
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout
uses: actions/checkout@master
- name: Set Deployed Flag
run: |
bash ./.github/set-deployed-flag.sh ${{ github.ref_name }}
# 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: Export API Key
run: bash ./.github/setEnvironment.sh ${{ secrets.FIREBASECONFIG }}
- name: Build SEO Pages
env:
VET_SEO_IS_DEV_MODE: true
VET_BASE_SITE_URL: https://5etools-mirror-1.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 .gitmodules *.md *.zip scss spellcheck homebrew prerelease
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 (1 hour)
timeout: 3600000