Release 0.5.6-awc.1 #24
Workflow file for this run
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: Deploy | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
name: Build | |
if: github.repository == 'ADOFAI-gg/ADOFAI-gg-Web' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache node_modules | |
uses: actions/[email protected] | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: VITE_API_BASE_URL=https://adofai.gg:9200 VITE_UA_NUMBER='UA-181311513-1' VITE_GA_NUMBER='G-3BKXMVNJYQ' yarn build | |
- name: Zip output | |
run: cd dist && zip -r ../dist.zip . && cd .. | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist.zip | |
deploy: | |
name: Deploy | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.repository == 'ADOFAI-gg/ADOFAI-gg-Web' | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
- name: Upload build to server | |
run: curl -F '[email protected]' -F 'token=${{ secrets.BUILD_UPLOAD_TOKEN }}' ${{ secrets.BUILD_UPLOAD_URL }} |