Skip to content

Commit 1d3255b

Browse files
committed
add workflow for marking stale translations
1 parent 2804bee commit 1d3255b

File tree

3 files changed

+66
-67
lines changed

3 files changed

+66
-67
lines changed

.github/workflows/deploy-api.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Fly Deploy Backend
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
10+
11+
jobs:
12+
deploy:
13+
name: Deploy backend
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Cancel previous runs
17+
uses: styfle/[email protected]
18+
with:
19+
workflow_id: 42688837
20+
access_token: ${{ github.token }}
21+
- uses: actions/checkout@v3
22+
- uses: superfly/flyctl-actions/setup-flyctl@master
23+
with:
24+
version: 0.3.221
25+
- run: flyctl deploy --remote-only --wait-timeout 300

.github/workflows/deploy-web.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy Frontend
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
name: Deploy frontend
11+
runs-on: macos-latest
12+
steps:
13+
- name: Cancel previous runs
14+
uses: styfle/[email protected]
15+
with:
16+
workflow_id: 42688838
17+
access_token: ${{ github.token }}
18+
19+
- uses: actions/checkout@v4
20+
21+
- name: Cache ~/.npm for npm ci
22+
uses: actions/cache@v4
23+
with:
24+
path: ~/.npm
25+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
26+
restore-keys: ${{ runner.os }}-node
27+
28+
- uses: AmyrAhmady/[email protected]
29+
30+
- name: Build frontend
31+
run: |
32+
cd frontend
33+
npm i
34+
DOCUSAURUS_IGNORE_SSG_WARNINGS=true npm run build
35+
36+
- name: Deploy 🚀
37+
uses: JamesIves/github-pages-deploy-action@v4
38+
with:
39+
folder: frontend/build
40+
single-commit: true
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy
1+
name: Mark Stale Translations
22

33
on:
44
push:
@@ -12,8 +12,6 @@ jobs:
1212
mark-translations:
1313
name: Mark translations outdated
1414
runs-on: ubuntu-latest
15-
outputs:
16-
translations_committed: ${{ steps.check-changes.outputs.translations_modified || 'false' }}
1715

1816
steps:
1917
- name: Checkout repository
@@ -77,67 +75,3 @@ jobs:
7775
if: steps.check-changes.outputs.translations_modified == 'true'
7876
run: |
7977
git push origin HEAD:${{ github.ref }}
80-
81-
deploy-backend:
82-
name: Deploy backend
83-
needs: mark-translations
84-
if: needs.mark-translations.outputs.translations_committed != 'true' || github.actor == 'github-actions[bot]'
85-
runs-on: ubuntu-latest
86-
env:
87-
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
88-
89-
steps:
90-
- name: Cancel previous runs
91-
uses: styfle/[email protected]
92-
with:
93-
workflow_id: ${{ github.workflow }}
94-
access_token: ${{ github.token }}
95-
96-
- name: Checkout repository
97-
uses: actions/checkout@v4
98-
99-
- name: Set up Flyctl
100-
uses: superfly/flyctl-actions/setup-flyctl@master
101-
with:
102-
version: 0.3.221
103-
104-
- name: Deploy backend to Fly.io
105-
run: flyctl deploy --remote-only --wait-timeout 300
106-
107-
deploy-frontend:
108-
name: Deploy frontend
109-
needs: mark-translations
110-
if: needs.mark-translations.outputs.translations_committed != 'true' || github.actor == 'github-actions[bot]'
111-
runs-on: macos-latest
112-
113-
steps:
114-
- name: Cancel previous runs
115-
uses: styfle/[email protected]
116-
with:
117-
workflow_id: ${{ github.workflow }}
118-
access_token: ${{ github.token }}
119-
120-
- name: Checkout repository
121-
uses: actions/checkout@v4
122-
123-
- name: Cache ~/.npm for npm ci
124-
uses: actions/cache@v4
125-
with:
126-
path: ~/.npm
127-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
128-
restore-keys: ${{ runner.os }}-node
129-
130-
- name: Restore web cache
131-
uses: AmyrAhmady/[email protected]
132-
133-
- name: Build frontend
134-
run: |
135-
cd frontend
136-
npm i
137-
DOCUSAURUS_IGNORE_SSG_WARNINGS=true npm run build
138-
139-
- name: Deploy frontend
140-
uses: JamesIves/github-pages-deploy-action@v4
141-
with:
142-
folder: frontend/build
143-
single-commit: true

0 commit comments

Comments
 (0)