| # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
| |
| name: Node.js CI |
| |
| on: |
| push |
| |
| jobs: |
| deploy: |
| |
| env: |
| CROWDIN_DOCUSAURUS_API_KEY: ${{ secrets.CROWDIN_DOCUSAURUS_API_KEY }} |
| CROWDIN_DOCUSAURUS_PROJECT_ID: ${{ secrets.CROWDIN_DOCUSAURUS_PROJECT_ID }} |
| CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} |
| CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} |
| GH_EMAIL: ${{ secrets.GH_EMAIL }} |
| GH_NAME: ${{ secrets.GH_NAME }} |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
| |
| runs-on: ubuntu-latest |
| |
| strategy: |
| matrix: |
| node-version: [ 12.x ] |
| # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ |
| |
| steps: |
| - uses: actions/checkout@v2 |
| - name: Use Node.js ${{ matrix.node-version }} |
| uses: actions/setup-node@v2 |
| with: |
| node-version: ${{ matrix.node-version }} |
| |
| - name: Init Website |
| run: | |
| git config --global user.name "${GH_NAME}" |
| git config --global user.email "${GH_EMAIL}" |
| echo "machine github.com login ${GH_NAME} password ${GH_TOKEN}" > ~/.netrc |
| cd website && yarn install && yarn run write-translations && cd .. |
| |
| - name: Crowdin Action |
| uses: crowdin/github-action@1.4.8 |
| with: |
| download_translations: true |
| config: crowdin_gh.yaml |
| crowdin_branch_name: master |
| create_pull_request: false |
| |
| - name: Deploy Website |
| run: cd website && yarn install && GIT_USER="${GH_NAME}" yarn run publish-gh-pages |