mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
feat(workflows): enhance GitHub Actions workflows with concurrency control and deployment updates
This commit is contained in:
parent
6898c126e3
commit
78a03f2827
3 changed files with 38 additions and 7 deletions
33
.github/workflows/docusaurus.yml
vendored
33
.github/workflows/docusaurus.yml
vendored
|
|
@ -10,13 +10,24 @@ on:
|
||||||
- 'v*.*.*'
|
- 'v*.*.*'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# Concurrency control: cancel in-progress deployments
|
||||||
|
# Pattern from GitHub Actions best practices for deployment workflows
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: Build and Deploy Documentation Sites
|
name: Build and Deploy Documentation Sites
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|
@ -25,6 +36,10 @@ jobs:
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 24
|
node-version: 24
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: |
|
||||||
|
docs/user/package-lock.json
|
||||||
|
docs/developer/package-lock.json
|
||||||
|
|
||||||
# USER DOCS BUILD
|
# USER DOCS BUILD
|
||||||
- name: Install user docs dependencies
|
- name: Install user docs dependencies
|
||||||
|
|
@ -123,11 +138,15 @@ jobs:
|
||||||
echo "Version snapshots committed and pushed to main"
|
echo "Version snapshots committed and pushed to main"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# DEPLOY
|
# DEPLOY TO GITHUB PAGES
|
||||||
- name: Deploy to GitHub Pages
|
- name: Setup Pages
|
||||||
uses: peaceiris/actions-gh-pages@v4
|
uses: actions/configure-pages@v5
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
path: ./deploy-root
|
||||||
publish_dir: ./deploy-root
|
|
||||||
user_name: github-actions[bot]
|
- name: Deploy to GitHub Pages
|
||||||
user_email: github-actions[bot]@users.noreply.github.com
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
|
|
|
||||||
6
.github/workflows/lint.yml
vendored
6
.github/workflows/lint.yml
vendored
|
|
@ -4,9 +4,15 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- '.github/workflows/docusaurus.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- '.github/workflows/docusaurus.yml'
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
|
|
|
||||||
6
.github/workflows/validate.yml
vendored
6
.github/workflows/validate.yml
vendored
|
|
@ -7,9 +7,15 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- '.github/workflows/docusaurus.yml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- '.github/workflows/docusaurus.yml'
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue