Skip to content

Commit 49f56ca

Browse files
author
Vianpyro
committed
Refactor GitHub Actions workflows: update devcontainer verification, remove unused docker-image-verification, and add deploy-to-pages workflow
1 parent f587ad0 commit 49f56ca

4 files changed

Lines changed: 60 additions & 57 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy static content to Pages
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# Cancel any in-progress runs.
16+
concurrency:
17+
group: 'pages'
18+
cancel-in-progress: true
19+
20+
jobs:
21+
deploy:
22+
environment:
23+
name: github-pages
24+
url: ${{ steps.deployment.outputs.page_url }}
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Install Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: 22
35+
36+
- name: Install dependencies
37+
run: npm ci
38+
39+
- name: Build Astro site
40+
run: npm run build
41+
42+
- name: Setup Pages
43+
uses: actions/configure-pages@v5
44+
45+
- name: Upload artifact
46+
uses: actions/upload-pages-artifact@v3
47+
with:
48+
path: './dist'
49+
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

.github/workflows/devcontainer-verification.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
name: Scan Devcontainer Image
22

33
permissions:
4-
actions: read
5-
security-events: write
4+
contents: read
65

76
on:
87
push:
98
branches:
109
- main
1110
- master
12-
pull_request: null
11+
paths:
12+
- .devcontainer/Dockerfile
13+
pull_request:
14+
paths:
15+
- .devcontainer/Dockerfile
1316

1417
jobs:
1518
scan-devcontainer:
1619
name: Scan Devcontainer Image
1720

18-
uses: <your-username>/<your-repo>/.github/workflows/docker-image-verification.yml@main
21+
uses: Vianpyro/Template/.github/workflows/docker-image-verification.yml@main
1922
with:
2023
image_name: devcontainer
2124
dockerfile_path: ./Dockerfile

.github/workflows/docker-image-verification.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/workflows/super-linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ jobs:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3131
VALIDATE_ALL_CODEBASE: false
3232
FILTER_REGEX_EXCLUDE: '(.devcontainer/Dockerfile|.github/pull_request_template.md|.github/ISSUE_TEMPLATE/*.md)'
33+
VALIDATE_TYPESCRIPT_STANDARD: false

0 commit comments

Comments
 (0)