From bce78b8262fdc7013f8af77a98be69f0bef9f4cf Mon Sep 17 00:00:00 2001 From: Lorenzo Pappalardo Date: Wed, 3 Apr 2024 22:37:50 +0200 Subject: [PATCH] Updated workflow --- .github/workflows/Build_&_Deploy.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/Build_&_Deploy.yml b/.github/workflows/Build_&_Deploy.yml index 1e24ea0..f8c377a 100644 --- a/.github/workflows/Build_&_Deploy.yml +++ b/.github/workflows/Build_&_Deploy.yml @@ -2,17 +2,20 @@ name: Build & Deploy on: push: - branches: [master] + branches: + - main + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set Node version - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: '12.x' @@ -20,21 +23,18 @@ jobs: run: npm install - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: - path: | - **/node_modules + path: '**/node_modules' key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} - name: Deploy run: | - git config --global user.name $user_name - git config --global user.email $user_email - git remote set-url origin https://${github_token}@github.com/${repository} + git config --global user.name $name + git config --global user.email $email + git remote set-url origin https://github.com/$repository npm run deploy - env: - user_name: 'github-actions[bot]' - user_email: 'github-actions[bot]@users.noreply.github.com' - github_token: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }} + name: 'github-actions[bot]' + email: 'github-actions[bot]@users.noreply.github.com' repository: ${{ github.repository }}