-
Notifications
You must be signed in to change notification settings - Fork 284
47 lines (43 loc) · 1.53 KB
/
reviewstack.dev-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
name: Publish https://reviewstack.dev
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1-5'
jobs:
deploy:
runs-on: ubuntu-22.04
# Our build container already has Node, Yarn, and Python installed.
container:
image: ${{ format('ghcr.io/{0}/build_ubuntu_22_04:latest', github.repository) }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Grant Access
run: git config --global --add safe.directory "$PWD"
- name: Install dependencies
working-directory: ./eden/contrib/
run: yarn install --prefer-offline
# Build codegen and then do some sanity checks so we don't push the site
# when the tests are broken.
- name: GraphQL/TextMate codegen
working-directory: ./eden/contrib/reviewstack
run: yarn codegen
- name: ESLint
working-directory: ./eden/contrib/reviewstack
run: yarn eslint
- name: Unit tests
working-directory: ./eden/contrib/reviewstack
run: yarn test --watchAll=false
- name: Build the static site
working-directory: ./eden/contrib/reviewstack.dev
run: yarn release
# Push to the release branch.
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: reviewstack.dev-prod
publish_dir: ./eden/contrib/reviewstack.dev/build