-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.16 KB
/
web.yml
File metadata and controls
41 lines (39 loc) · 1.16 KB
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
name: web
on:
push:
branches:
- src
jobs:
web:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Yarn cache
uses: actions/cache@preview
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Build the website
run: |
npm install -g yarn
yarn --frozen-lockfile
yarn generate
git checkout master
rm -rf favicon.ico _nuxt robots.txt sw.js index.html credits
cp -r dist/* .
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@noreply.github.com"
git add --all .
git commit -m "Update / @ ${GITHUB_SHA}"
git push "https://${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}.git" HEAD:master
git checkout "${GITHUB_SHA}"
env:
VUE_APP_GAID: ${{ secrets.VUE_APP_GAID }}
GITHUB_PAT: ${{ secrets.GITHUB_PAT }}