|
6 | 6 | branches: |
7 | 7 | - main |
8 | 8 |
|
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + pages: write |
| 12 | + id-token: write |
| 13 | + |
| 14 | +concurrency: |
| 15 | + group: pages |
| 16 | + cancel-in-progress: false |
| 17 | + |
9 | 18 | jobs: |
10 | | - deploy: |
11 | | - name: Deploy to Github Pages |
| 19 | + build: |
| 20 | + name: Build |
12 | 21 | runs-on: ubuntu-latest |
13 | 22 |
|
14 | 23 | steps: |
15 | 24 | - name: Checkout |
16 | | - uses: actions/checkout@v3 |
| 25 | + uses: actions/checkout@v4 |
17 | 26 |
|
18 | 27 | - name: Setup |
19 | 28 | uses: ./.github/actions/setup |
20 | 29 |
|
21 | | - # - name: Use crowdin |
22 | | - # run: | |
23 | | - # wget -c https://artifacts.crowdin.com/repo/deb/crowdin.deb -O crowdin.deb |
24 | | - # sudo dpkg -i crowdin.deb |
25 | | - |
26 | | - # - name: Sync with crowdin |
27 | | - # env: |
28 | | - # CROWDIN_DOCUSAURUS_PROJECT_ID: react-navigation |
29 | | - # CROWDIN_DOCUSAURUS_API_KEY: ${{ secrets.CROWDIN_DOCUSAURUS_API_KEY }} |
30 | | - # run: | |
31 | | - # yarn crowdin-upload |
32 | | - # yarn crowdin-download |
33 | | - |
34 | 30 | - name: Update sponsors list |
35 | 31 | env: |
36 | 32 | GITHUB_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }} |
37 | 33 | run: yarn fetch-sponsors |
38 | 34 |
|
39 | | - - name: Publish to Github pages |
40 | | - env: |
41 | | - GITHUB_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }} |
42 | | - GITHUB_EMAIL: ${{ secrets.DEPLOY_GITHUB_EMAIL }} |
43 | | - GIT_USER: ${{ secrets.DEPLOY_GITHUB_USER }} |
44 | | - CURRENT_BRANCH: $GITHUB_REF |
45 | | - run: | |
46 | | - git config --global user.email "$GITHUB_EMAIL" |
47 | | - git config --global user.name "$GITHUB_ACTOR" |
48 | | - echo "machine github.com login $GIT_USER password $GITHUB_TOKEN" > ~/.netrc |
49 | | - yarn deploy |
| 35 | + - name: Build |
| 36 | + run: yarn build |
| 37 | + |
| 38 | + - name: Upload artifact |
| 39 | + uses: actions/upload-pages-artifact@v3 |
| 40 | + with: |
| 41 | + path: build |
| 42 | + |
| 43 | + deploy: |
| 44 | + name: Deploy to GitHub Pages |
| 45 | + needs: build |
| 46 | + runs-on: ubuntu-latest |
| 47 | + |
| 48 | + environment: |
| 49 | + name: github-pages |
| 50 | + url: ${{ steps.deployment.outputs.page_url }} |
| 51 | + |
| 52 | + steps: |
| 53 | + - name: Deploy to GitHub Pages |
| 54 | + id: deployment |
| 55 | + uses: actions/deploy-pages@v4 |
0 commit comments