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*.*.*'
|
||||
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:
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Build and Deploy Documentation Sites
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
|
|
@ -25,6 +36,10 @@ jobs:
|
|||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
docs/user/package-lock.json
|
||||
docs/developer/package-lock.json
|
||||
|
||||
# USER DOCS BUILD
|
||||
- name: Install user docs dependencies
|
||||
|
|
@ -123,11 +138,15 @@ jobs:
|
|||
echo "Version snapshots committed and pushed to main"
|
||||
fi
|
||||
|
||||
# DEPLOY
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@v4
|
||||
# DEPLOY TO GITHUB PAGES
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./deploy-root
|
||||
user_name: github-actions[bot]
|
||||
user_email: github-actions[bot]@users.noreply.github.com
|
||||
path: ./deploy-root
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
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:
|
||||
branches:
|
||||
- "main"
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docusaurus.yml'
|
||||
pull_request:
|
||||
branches:
|
||||
- "main"
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docusaurus.yml'
|
||||
|
||||
permissions: {}
|
||||
|
||||
|
|
|
|||
6
.github/workflows/validate.yml
vendored
6
.github/workflows/validate.yml
vendored
|
|
@ -7,9 +7,15 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docusaurus.yml'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docusaurus.yml'
|
||||
|
||||
permissions: {}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue