Merge pull request #186 from g0v/improve-regex-for-js #45
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: ui-deploy | |
defaults: | |
run: | |
working-directory: ui | |
on: | |
push: | |
branches: | |
- main | |
- master | |
env: | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{secrets.SENTRY_ORG}} | |
SENTRY_PROJECT: ${{secrets.SENTRY_PROJECT}} | |
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 }} | |
check-latest: true | |
- name: Cache node_modules 📦 | |
uses: actions/[email protected] | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies 👨🏻💻 | |
run: npm ci --prefer-offline --no-audit | |
- name: Prepare env | |
run: touch .env | |
- name: Build UI | |
run: npm run generate | |
- name: Deploy | |
uses: peaceiris/[email protected] | |
with: | |
DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
PUBLISH_BRANCH: gh-pages | |
PUBLISH_DIR: ./ui/dist |