generated from antfu-collective/vitesse
-
-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (60 loc) · 1.88 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Deploy
on:
push:
branches:
- main
paths:
- '.github/**/*'
- 'patches/**/*'
- 'packages/**/*'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'tsconfig.json'
- '.npmrc'
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install
- run: pnpm build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: deploy
FOLDER: packages/web/dist
- name: get hash of last commit to main
id: commit_hash
run: echo "commit_hash=$(git log -1 --skip 1 --format='%H')" >> $GITHUB_OUTPUT
- uses: dorny/paths-filter@v3
id: changes
with:
base: ${{ steps.commit_hash.outputs.commit_hash }}
filters: |
src:
- '.github/workflows/deploy.yml'
- 'patches/**'
- 'packages/web/**'
- 'tsconfig.json'
android:
- '.github/actions/deploy-to-google-play/action.yml'
- 'packages/android/**'
ios:
- 'packages/ios/**'
- uses: ./.github/actions/deploy-to-google-play
if: env.DEPLOYMENT_STATUS == 'success' && (steps.changes.outputs.src == 'true' || steps.changes.outputs.android == 'true')
with:
keystore-base64: ${{ secrets.ANDROID_DEPLOY_KEYSTORE_BASE64 }}
keystore-password: ${{ secrets.ANDROID_DEPLOY_KEYSTORE_PASSWD }}
service-account-key: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}