-
Notifications
You must be signed in to change notification settings - Fork 24
52 lines (50 loc) · 1.49 KB
/
main.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
name: CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "13.1.0"
- name: Setup Git Config
run: |
git config --global user.email "[email protected]"
git config --global user.name "Automated Deployment"
- name: Print working directory
run: pwd
- name: Print working directory contents
run: ls -al
- name: Report node version
run: node --version
- name: Report node location
run: which node
- name: Report npm location
run: which npm
- name: Report npm version
run: npm --version
- name: Clean node modules
run: cd web && rm -rf node_modules
- name: Clean gatsby cache
run: cd web && rm -rf .cache
- name: Clean npm cache
run: cd web && npm cache clean --force
- name: npm install
run: cd web && npm install --verbose
- name: npm rebuild
run: cd web && npm rebuild
- name: npm run gatsby-build
run: cd web && npm run gatsby-build
- name: Copy built artifacts to root directory
run: cp -r web/public ./public
- name: Build and Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: public
CNAME: cifilter.app