-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (36 loc) · 1.27 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy to GitHub Pages
on:
workflow_run:
workflows: ["CI"]
types:
- completed
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Install dependencies
run: npm ci
- name: Load .env.production
run: |
echo "DUBBING_API_BASE_URL=$(grep DUBBING_API_BASE_URL .env.production | cut -d '=' -f2)" >> $GITHUB_ENV
echo "TRANSCRIPTION_API_BASE_URL=$(grep TRANSCRIPTION_API_BASE_URL .env.production | cut -d '=' -f2)" >> $GITHUB_ENV
echo "MATXA_API_BASE_URL=$(grep MATXA_API_BASE_URL .env.production | cut -d '=' -f2)" >> $GITHUB_ENV
- name: Build
run: npm run build:prod
env:
DUBBING_API_BASE_URL: ${{ env.DUBBING_API_BASE_URL }}
TRANSCRIPTION_API_BASE_URL: ${{ env.TRANSCRIPTION_API_BASE_URL }}
MATXA_API_BASE_URL: ${{ env.MATXA_API_BASE_URL }}
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist