-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (55 loc) · 1.76 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
name: Deploy website
on:
push:
branches:
- master
workflow_dispatch:
jobs:
deploy:
name: Deploy website
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Initialize Node.js environment
uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: Check out deploy branch
uses: actions/checkout@v2
with:
ref: deploy
path: deploy
- name: Clean up output
run: git rm -rf *
working-directory: deploy
- name: Set up dependencies
run: npm install
- name: Stylize images
env:
STYLIZATION_SDK_API_KEY: ${{ secrets.STYLIZATION_SDK_API_KEY }}
STYLIZATION_SDK_API_KEY_ID: ${{ secrets.STYLIZATION_SDK_API_KEY_ID }}
STYLIZATION_SDK_API_ROUTE: ${{ secrets.STYLIZATION_SDK_API_ROUTE }}
STYLIZATION_SDK_API_URL: ${{ secrets.STYLIZATION_SDK_API_URL }}
run: npm run stylize
- name: Build website
run: npm run build -- --output-path=deploy
- name: Check out website archive
uses: actions/checkout@v2
with:
repository: vinci-conf/website-archive
path: archive
- name: Copy archive to output
run: cp -r archive/* deploy
- name: Create CNAME
run: echo "vinci-conf.org" > CNAME
working-directory: deploy
- name: Commit result
run: |
git config user.email "${{ github.event.pusher.email }}"
git config user.name "${{ github.event.pusher.name }}"
git add *
git diff-index --quiet HEAD || git commit -m "deploy: ${{ github.event.head_commit.message }}"
git push
working-directory: deploy