This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
skynet-webportal/.github/workflows/deploy-website.yml

48 lines
1.1 KiB
YAML
Raw Normal View History

2021-03-28 17:03:53 +00:00
name: Deploy website to Skynet
on:
2021-09-27 22:04:50 +00:00
push:
branches:
- master
paths:
- "packages/website/**"
2021-04-14 11:39:14 +00:00
pull_request:
paths:
- "packages/website/**"
2021-03-28 17:03:53 +00:00
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
2021-07-26 12:46:21 +00:00
- uses: actions/setup-node@v2
2021-03-28 17:03:53 +00:00
with:
2021-07-26 11:28:27 +00:00
node-version: 16.x
2021-03-28 17:03:53 +00:00
2021-07-26 11:28:27 +00:00
- run: yarn
- run: yarn 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
2021-04-13 10:44:57 +00:00
install: false
2021-04-13 10:32:03 +00:00
record: true
2021-07-26 11:28:27 +00:00
start: yarn serve
2021-04-13 10:32:03 +00:00
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:57:32 +00:00
upload-dir: packages/website/public
2021-03-28 17:03:53 +00:00
github-token: ${{ secrets.GITHUB_TOKEN }}
2021-07-26 17:35:52 +00:00
registry-seed: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && secrets.WEBSITE_REGISTRY_SEED || '' }}