Skip to content

Commit f183e25

Browse files
authored
Merge pull request #212 from fslaborg/fix-vulnerability-warnings
Deploy docs to GitHub pages
2 parents 310a37d + bf7de71 commit f183e25

File tree

5 files changed

+1421
-1949
lines changed

5 files changed

+1421
-1949
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM mcr.microsoft.com/devcontainers/dotnet:8.0
2+
3+
RUN apt-get update && \
4+
apt-get -y install npm

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "dotnet8.0",
3-
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0",
4-
"postCreateCommand": "dotnet tool restore",
3+
"dockerFile": "Dockerfile",
4+
"postCreateCommand": "dotnet tool restore && cd docs && npm install --save-dev",
55
"customizations": {
66
"vscode": {
77
"extensions": [
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Copy files
24+
run: |
25+
mkdir -p dist
26+
cp -r ./docs/* ./dist/
27+
rm ./dist/package.json ./dist/package-lock.json
28+
29+
- name: Upload artifact
30+
uses: actions/upload-pages-artifact@v3
31+
with:
32+
path: './dist'
33+
34+
deploy:
35+
environment:
36+
name: github-pages
37+
url: ${{ steps.deployment.outputs.page_url }}
38+
runs-on: ubuntu-latest
39+
needs: build
40+
steps:
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)