-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.08 KB
/
deploy-prod.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
name: Deploy to Production
on:
push:
tags:
- "v*" # listens to tags starting with 'v', e.g. v1.0.0, v2.3.4
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: |
yarn install
- name: Build site
run: |
yarn build
env:
ENVIRONMENT: production
- name: Add CNAME file
run: |
echo "cola.games" > out/CNAME
- name: Deploy to Production Repo
run: |
cd out
git init
git config user.name "github-actions"
git config user.email "[email protected]"
git add .
git commit -m "Production deploy for $GITHUB_REF"
# Force push to the gh-pages branch of your production repo
git push --force "https://x-access-token:${{ secrets.PRODUCTION_PAT }}@github.com/cdracars/cola.games.git" HEAD:gh-pages