From c97acc0a3e9b5104e4c24d5312804891ba734d4c Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Mon, 11 Nov 2024 20:57:32 +0530 Subject: [PATCH] Upgrade GitHub actions --- .github/workflows/docs-deploy.yml | 25 ++++++++++++------------- .github/workflows/i18n-deploy.yml | 6 +++--- .github/workflows/node-ci.yml | 6 +++--- .github/workflows/npm-publish.yml | 6 +++--- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index d8280d9..7435601 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -12,40 +12,39 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 + uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 22 - run: npm ci - run: npm run docs - name: Upload docs to Toolforge - uses: garygrossgarten/github-action-scp@dba89d858413133b6e35da91a3c989cc8cde3ad4 + uses: appleboy/scp-action@9ba62064d28ce0897a970e72cdfe30b9fde2fe48 with: - local: /home/runner/work/twinkle-core/twinkle-core/docs - remote: /data/project/twinkle/www/static/core-docs + source: ${{github.workspace}}/docs/* + target: /data/project/twinkle/www/static/core-docs host: login.toolforge.org username: ${{ secrets.TOOLFORGE_USERNAME }} - privateKey: ${{ secrets.TOOLFORGE_PRIVATE_KEY }} - rmRemote: true - dotfiles: true + key: ${{ secrets.TOOLFORGE_PRIVATE_KEY }} + rm: true versiondocs: needs: deploydocs runs-on: ubuntu-latest if: ${{github.event_name == 'release'}} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Read package.json version uses: martinbeentjes/npm-get-version-action@master id: get-version - name: Save the documentation with version number - uses: garygrossgarten/github-action-ssh@2b10f41b5a33808f6d24eafd253296766308b7c4 + uses: appleboy/ssh-action@551964ebda1034f0b5449d74db25c42e371ca1f7 with: - command: >- + script: >- become twinkle bash -c ' cd /data/project/twinkle/www/static; cp -r core-docs "core-docs-${{ steps.get-version.outputs.current-version }}"; ' host: login.toolforge.org username: ${{ secrets.TOOLFORGE_USERNAME }} - privateKey: ${{ secrets.TOOLFORGE_PRIVATE_KEY }} + key: ${{ secrets.TOOLFORGE_PRIVATE_KEY }} \ No newline at end of file diff --git a/.github/workflows/i18n-deploy.yml b/.github/workflows/i18n-deploy.yml index 97fd774..8a9fa2d 100644 --- a/.github/workflows/i18n-deploy.yml +++ b/.github/workflows/i18n-deploy.yml @@ -14,12 +14,12 @@ jobs: deployi18n: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: fetch-depth: 0 # all branches - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: - node-version: '16' + node-version: 22 - run: npm ci - name: Sanitise strings and resolve fallback messages run: node scripts/build-i18n diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 87aadc7..3849c6b 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -10,9 +10,9 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 22 - run: npm ci - run: npm run test diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index c9b01e6..a0ae019 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -8,10 +8,10 @@ jobs: publish-npm: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 22 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm test