forked from electinth/constitution
-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (29 loc) · 937 Bytes
/
staging.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
name: Deploy to Staging
on: workflow_dispatch
jobs:
pipeline:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Populate data JSONs
run: ./populate-data.sh
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: Install dependencies
run: yarn
- name: Build project
run: yarn generate
env:
BASE_PATH: /reconstitution
SITE_URL: https://wevisdemo.github.io/reconstitution
STRAPI_ENDPOINT: https://cms.constitution.kickdown.dev
STRAPI_TOKEN: ${{ secrets.STRAPI_TOKEN }}
- name: Include JSONs data in deployment
run: mkdir dist/data && cp data/*.json dist/data/
- name: Deploy to Github Page
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist