Skip to content

Updating deployment GH actions and adding concurrency management #1905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/deploy-prd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches:
- main

concurrency:
group: deploy-production
cancel-in-progress: true

jobs:
build:
if: "github.repository == 'arduino/docs-content'"
Expand All @@ -15,10 +19,10 @@ jobs:
APP_ENV: prod

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
Expand All @@ -36,7 +40,7 @@ jobs:
find ./content/hardware -type f -name "*-pinout.png" -exec cp {} ./static/resources/pinouts/ \;

- name: Gatsby main cache
uses: actions/cache@v3
uses: actions/cache@v4
id: gatsby-cache-folder
with:
path: .cache
Expand All @@ -45,7 +49,7 @@ jobs:
${{ runner.os }}-cache-gatsby-

- name: Gatsby Public Folder
uses: actions/cache@v3
uses: actions/cache@v4
id: gatsby-public-folder
with:
path: public/
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/deploy-stg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches:
- ghaction

concurrency:
group: deploy-staging
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -14,11 +18,11 @@ jobs:
APP_ENV: staging

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: git log -1 --pretty=format:%aI content/learn/04.electronics/05.servo-motors/servo-motors.md
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
Expand All @@ -36,7 +40,7 @@ jobs:
find ./content/hardware -type f -name "*-pinout.png" -exec cp {} ./static/resources/pinouts/ \;

- name: Gatsby main cache
uses: actions/cache@v3
uses: actions/cache@v4
id: gatsby-cache-folder
with:
path: .cache
Expand All @@ -45,7 +49,7 @@ jobs:
${{ runner.os }}-cache-gatsby-

- name: Gatsby Public Folder
uses: actions/cache@v3
uses: actions/cache@v4
id: gatsby-public-folder
with:
path: public/
Expand Down
Loading