Merge pull request #434 from pycontw/feat/add-shuttle-service-tab #357
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test, build, deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
cd: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [14] | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@master | |
- name: Setup node env π | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Install dependencies π¨π»βπ» | |
run: npm ci | |
- name: Run linter π | |
run: npm run lint | |
- name: Run tests π§ͺ | |
run: npm run test | |
- name: Build π·π½ | |
run: npm run generate | |
env: | |
ROUTER_BASE: /pycontw-frontend/ # repo name | |
BUILD_TARGET: static | |
API_URL_BROWSER: https://staging.pycon.tw/prs | |
AUTH_TOKEN: ${{ secrets.AUTH_TOKEN }} | |
GOOGLE_TAG_MANAGER_ID: ${{ secrets.GOOGLE_TAG_MANAGER_ID }} | |
- name: Deploy π | |
uses: JamesIves/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: dist | |
CLEAN: true |