-
Notifications
You must be signed in to change notification settings - Fork 1.9k
49 lines (41 loc) · 1.33 KB
/
main.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
name: Deploy
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
name: Deploy to Github Pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
# - name: Use crowdin
# run: |
# wget -c https://artifacts.crowdin.com/repo/deb/crowdin.deb -O crowdin.deb
# sudo dpkg -i crowdin.deb
# - name: Sync with crowdin
# env:
# CROWDIN_DOCUSAURUS_PROJECT_ID: react-navigation
# CROWDIN_DOCUSAURUS_API_KEY: ${{ secrets.CROWDIN_DOCUSAURUS_API_KEY }}
# run: |
# yarn crowdin-upload
# yarn crowdin-download
- name: Update sponsors list
env:
GITHUB_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
run: yarn fetch-sponsors
- name: Publish to Github pages
env:
GITHUB_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
GITHUB_EMAIL: ${{ secrets.DEPLOY_GITHUB_EMAIL }}
GIT_USER: ${{ secrets.DEPLOY_GITHUB_USER }}
CURRENT_BRANCH: $GITHUB_REF
run: |
git config --global user.email "$GITHUB_EMAIL"
git config --global user.name "$GITHUB_ACTOR"
echo "machine github.com login $GIT_USER password $GITHUB_TOKEN" > ~/.netrc
yarn deploy