Skip to content

Commit efcedf7

Browse files
committed
Update GH actions
1 parent 4068af6 commit efcedf7

File tree

5 files changed

+70
-92
lines changed

5 files changed

+70
-92
lines changed

.github/actions/setup/action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Setup
2+
description: Setup Node.js and install dependencies
3+
4+
runs:
5+
using: composite
6+
steps:
7+
- name: Setup Node.js
8+
uses: actions/setup-node@v3
9+
with:
10+
node-version-file: .nvmrc
11+
cache: 'npm'
12+
13+
- name: Cache dependencies
14+
id: yarn-cache
15+
uses: actions/cache@v3
16+
with:
17+
path: |
18+
**/node_modules
19+
.yarn/install-state.gz
20+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
21+
restore-keys: |
22+
${{ runner.os }}-yarn-
23+
24+
- name: Install dependencies
25+
if: steps.yarn-cache.outputs.cache-hit != 'true'
26+
run: yarn install --immutable
27+
shell: bash

.github/workflows/ci.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build
1+
name: CI
22

33
on: [pull_request]
44

@@ -8,23 +8,11 @@ jobs:
88
runs-on: ubuntu-latest
99

1010
steps:
11-
- uses: actions/checkout@v1
11+
- name: Checkout
12+
uses: actions/checkout@v3
1213

13-
- name: Use Node.js 12.13
14-
uses: actions/setup-node@v1
15-
with:
16-
node-version: 12.13
14+
- name: Setup
15+
uses: ./.github/actions/setup
1716

18-
- name: Restore yarn cache
19-
id: yarn-cache
20-
uses: actions/cache@master
21-
with:
22-
path: '**/node_modules'
23-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
24-
25-
- name: Install dependencies
26-
if: steps.yarn-cache.outputs.cache-hit != 'true'
27-
run: yarn install --frozen-lockfile
28-
29-
- name: Build pages
30-
run: yarn build
17+
- name: Build pages
18+
run: yarn build

.github/workflows/main.yml

Lines changed: 35 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,38 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v1
15-
16-
- name: Use Node.js 12.13
17-
uses: actions/setup-node@v1
18-
with:
19-
node-version: 12.13
20-
21-
- name: Restore yarn cache
22-
id: yarn-cache
23-
uses: actions/cache@master
24-
with:
25-
path: '**/node_modules'
26-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27-
28-
- name: Install dependencies
29-
if: steps.yarn-cache.outputs.cache-hit != 'true'
30-
run: yarn install --frozen-lockfile
31-
32-
# - name: Use crowdin
33-
# run: |
34-
# wget -c https://artifacts.crowdin.com/repo/deb/crowdin.deb -O crowdin.deb
35-
# sudo dpkg -i crowdin.deb
36-
37-
# - name: Sync with crowdin
38-
# env:
39-
# CROWDIN_DOCUSAURUS_PROJECT_ID: react-navigation
40-
# CROWDIN_DOCUSAURUS_API_KEY: ${{ secrets.CROWDIN_DOCUSAURUS_API_KEY }}
41-
# run: |
42-
# yarn crowdin-upload
43-
# yarn crowdin-download
44-
45-
- name: Update sponsors list
46-
env:
47-
GITHUB_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
48-
run: yarn fetch-sponsors
49-
- name: Publish to Github pages
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
52-
GITHUB_EMAIL: ${{ secrets.DEPLOY_GITHUB_EMAIL }}
53-
GIT_USER: ${{ secrets.DEPLOY_GITHUB_USER }}
54-
CURRENT_BRANCH: $GITHUB_REF
55-
run: |
56-
git config --global user.email "$GITHUB_EMAIL"
57-
git config --global user.name "$GITHUB_ACTOR"
58-
echo "machine github.com login $GIT_USER password $GITHUB_TOKEN" > ~/.netrc
59-
yarn deploy
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Setup
18+
uses: ./.github/actions/setup
19+
20+
# - name: Use crowdin
21+
# run: |
22+
# wget -c https://artifacts.crowdin.com/repo/deb/crowdin.deb -O crowdin.deb
23+
# sudo dpkg -i crowdin.deb
24+
25+
# - name: Sync with crowdin
26+
# env:
27+
# CROWDIN_DOCUSAURUS_PROJECT_ID: react-navigation
28+
# CROWDIN_DOCUSAURUS_API_KEY: ${{ secrets.CROWDIN_DOCUSAURUS_API_KEY }}
29+
# run: |
30+
# yarn crowdin-upload
31+
# yarn crowdin-download
32+
33+
- name: Update sponsors list
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
36+
run: yarn fetch-sponsors
37+
38+
- name: Publish to Github pages
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }}
41+
GITHUB_EMAIL: ${{ secrets.DEPLOY_GITHUB_EMAIL }}
42+
GIT_USER: ${{ secrets.DEPLOY_GITHUB_USER }}
43+
CURRENT_BRANCH: $GITHUB_REF
44+
run: |
45+
git config --global user.email "$GITHUB_EMAIL"
46+
git config --global user.name "$GITHUB_ACTOR"
47+
echo "machine github.com login $GIT_USER password $GITHUB_TOKEN" > ~/.netrc
48+
yarn deploy

.github/workflows/rebase.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16.19.1

0 commit comments

Comments
 (0)