-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (49 loc) · 1.71 KB
/
deploy.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
name: "Deploying website to GitHub Pages"
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-20.04
name: "Deploying website to GitHub Pages"
steps:
- uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Make envfile
run: |
echo 'VITE_CONTACT_FORM_URL="${{ secrets.VITE_CONTACT_FORM_URL }}"' > .env
echo 'VITE_CONTACT_FORM_EMAIL_NAME="${{ secrets.VITE_CONTACT_FORM_EMAIL_NAME }}"' >> .env
echo 'VITE_CONTACT_FORM_QUESTION_NAME="${{ secrets.VITE_CONTACT_FORM_QUESTION_NAME }}"' >> .env
echo 'VITE_MAPBOX_STYLE="${{ secrets.VITE_MAPBOX_STYLE }}"' >> .env
echo 'VITE_MAPBOX_TOKEN="${{ secrets.VITE_MAPBOX_TOKEN }}"' >> .env
- name: Install dependencies
run: |
npm install
npm run build
- name: Handle SEO & 404s
run: |
cp index.html 404.html
for page in about services career contact privacy company career/developer career/intern bubbles partnerships
do
mkdir $page
cp index.html $page/index.html
done
working-directory: dist
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: public
FOLDER: dist
CLEAN: true