-
Notifications
You must be signed in to change notification settings - Fork 23
56 lines (46 loc) · 1.39 KB
/
project-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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Deploy Project
on:
push:
branches: 'main'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Dependencies
run: |
npm ci
- name: Get Version from package.json
id: get_version
run: |
VERSION=$(jq -r '.version' package.json)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build MV3 Project (for Chrome)
run: |
npm run build
- name: Build MV2 Project (for Firefox)
run: |
npm run build:firefox
- name: Deploy MV3 Project (for Chrome)
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.output/chrome-mv3
destination_dir: v${{ env.VERSION }}-chrome-mv3
publish_branch: deploy
- name: Deploy MV2 Project (for Firefox)
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.output/firefox-mv2
destination_dir: v${{ env.VERSION }}-firefox-mv2
publish_branch: deploy
keep_files: true