diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 152ae2a..01502d5 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -10,11 +10,11 @@ jobs: build_and_deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: npm install && npm run build + - uses: actions/checkout@v3 + - run: npm ci && npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TCL_30_WHATS_NEAR_ME_D2E34 }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TCL_30_WHATS_NEAR_ME }}' channelId: live - projectId: tcl-30-whats-near-me-d2e34 + projectId: tcl-30-whats-near-me diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index c5778fb..6bf9e84 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -8,10 +8,12 @@ jobs: if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - run: npm install && npm run build + - uses: actions/checkout@v3 + - run: npm ci && npm run build + with: + node-version-file: '.nvmrc' - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' - firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TCL_30_WHATS_NEAR_ME_D2E34 }}' - projectId: tcl-30-whats-near-me-d2e34 + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TCL_30_WHATS_NEAR_ME }}' + projectId: tcl-30-whats-near-me diff --git a/.github/workflows/update-deps.yml b/.github/workflows/update-deps.yml new file mode 100644 index 0000000..d6457aa --- /dev/null +++ b/.github/workflows/update-deps.yml @@ -0,0 +1,19 @@ +name: update-deps +on: create +jobs: + npm-update: + if: github.ref == 'refs/heads/main' + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + - run: npm update --dev + - run: git rm -r --cached .github + - run: rm -rf .github/ + - uses: EndBug/add-and-commit@latest + with: + add: '.' + message: 'Update dependencies with "npm update"' + push: true diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..5dbac1e --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v16.13.0 \ No newline at end of file