2021-03-28 17:03:53 +00:00
|
|
|
name: Deploy website to Skynet
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- website
|
|
|
|
|
2021-04-13 10:32:03 +00:00
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: packages/website
|
|
|
|
|
2021-03-28 17:03:53 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Use Node.js
|
|
|
|
uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: 15.x
|
|
|
|
|
|
|
|
- name: Install dependencies
|
2021-03-28 17:04:51 +00:00
|
|
|
run: npm i --force
|
2021-03-28 17:03:53 +00:00
|
|
|
|
|
|
|
- name: "Build website"
|
|
|
|
run: npm run build
|
2021-04-13 10:32:03 +00:00
|
|
|
|
|
|
|
- name: "Integration tests"
|
|
|
|
uses: cypress-io/github-action@v2
|
|
|
|
env:
|
|
|
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2021-04-13 10:43:12 +00:00
|
|
|
working-directory: packages/website
|
|
|
|
install-command: npm i --force --silent
|
2021-04-13 10:32:03 +00:00
|
|
|
record: true
|
|
|
|
start: npm run serve
|
|
|
|
wait-on: "http://127.0.0.1:9000"
|
2021-03-28 17:03:53 +00:00
|
|
|
|
|
|
|
- name: "Deploy to Skynet"
|
|
|
|
uses: kwypchlo/deploy-to-skynet-action@main
|
|
|
|
with:
|
2021-04-13 10:32:03 +00:00
|
|
|
upload-dir: public
|
2021-03-28 17:03:53 +00:00
|
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
2021-03-31 13:17:29 +00:00
|
|
|
registry-seed: ${{ github.event_name == 'push' && github.ref == 'refs/heads/website' && secrets.WEBSITE_REGISTRY_SEED || '' }}
|