Skip to content

Commit

Permalink
Updated workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenzo-Pappalardo committed Apr 3, 2024
1 parent da99474 commit a1b113f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/Build_&_Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@ 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'

- name: Install dependencies
run: npm install
run: npm ci

- 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 }}

0 comments on commit a1b113f

Please sign in to comment.