diff --git a/.github/workflows/node-cicd.yml b/.github/workflows/node-cicd.yml index c053829..3948da5 100644 --- a/.github/workflows/node-cicd.yml +++ b/.github/workflows/node-cicd.yml @@ -6,7 +6,7 @@ jobs: build: runs-on: ubuntu-latest permissions: - contents: write + contents: read packages: write steps: - name: Checkout @@ -46,10 +46,20 @@ jobs: echo "package=$(npm pkg get name)" >> $GITHUB_OUTPUT echo "version=$(npm pkg get version)" >> $GITHUB_OUTPUT + - name: clean out working dir + run: rm -rf * + + - uses: actions/setup-node@v4 + with: + node-version: '22' + registry-url: ${{ github.server_url != 'https://github.com' && format('{0}/api/packages/{1}/npm/', github.server_url, github.repository_owner) || 'https://npm.pkg.github.com' }} + scope: ${{ github.repository_owner }} + token: ${{ secrets.ACTIONS_TOKEN || github.token }} + - name: install latest published package run: | - mkdir /tmp/deployment - cd /tmp/deployment + #mkdir /tmp/deployment + #cd /tmp/deployment npm init --init-module deployment -y echo "${{ steps.info.outputs.package }}@${{ steps.info.outputs.version }}" npm i ${{ steps.info.outputs.package }}@${{ steps.info.outputs.version }} @@ -70,5 +80,5 @@ jobs: aws-account-id: 515966519418 dns-zone: 'test.aws.fireclover.cloud' subdomain: 'test-example' - web-path: '/tmp/deployment/node_modules/${{ steps.info.outputs.package }}/dist' - #web-path: 'node_modules/${{ steps.info.outputs.package }}/dist' + #web-path: '/tmp/deployment/node_modules/${{ steps.info.outputs.package }}/dist' + web-path: 'node_modules/${{ steps.info.outputs.package }}/dist'