-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (34 loc) · 940 Bytes
/
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
name: Build angular and push to gh-pages branch
on:
push:
branches:
- master
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
defaults:
# Set working dir to ./client since we are only building frontend
run:
working-directory: ./client
steps:
- uses: actions/checkout@master
- name: Use Node.js
uses: actions/setup-node@v1
with:
# Pin to node6
node-version: 6.x
- name: npm install and build
working-directory: ./client
# Install and build to gh-pages dir
# FIXME: do we still need `--base-href`?
run: |
npm install
npm run build -- --prod --output-path gh-pages --base-href /2022/
- name: Deploy
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: client/gh-pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}