Skip to content

Commit 6664984

Browse files
author
fabien.menager
committed
Add deploy workflow
1 parent 2c790ec commit 6664984

File tree

2 files changed

+14
-23
lines changed

2 files changed

+14
-23
lines changed

.github/workflows/docs.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ on:
44
push:
55
branches:
66
- master
7+
# TODO: Remove this when the docs website is ready to be merged into master :
8+
- feature/docs-website
79
paths:
810
- 'docs/**'
911
- '.github/workflows/docs.yml'
1012
workflow_dispatch:
1113

1214
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1315
permissions:
14-
contents: read
15-
pages: write
16-
id-token: write
16+
contents: write
1717

1818
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1919
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -22,8 +22,8 @@ concurrency:
2222
cancel-in-progress: false
2323

2424
jobs:
25-
build:
26-
name: Build VitePress site
25+
deploy:
26+
name: Build and deploy VitePress site
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout
@@ -38,9 +38,6 @@ jobs:
3838
cache: npm
3939
cache-dependency-path: docs/package-lock.json
4040

41-
- name: Setup Pages
42-
uses: actions/configure-pages@v5
43-
4441
- name: Install dependencies
4542
working-directory: docs
4643
run: npm ci
@@ -49,20 +46,13 @@ jobs:
4946
working-directory: docs
5047
run: npm run build
5148

52-
- name: Upload artifact
53-
uses: actions/upload-pages-artifact@v3
54-
with:
55-
path: docs/.vitepress/dist
56-
57-
deploy:
58-
name: Deploy to GitHub Pages
59-
environment:
60-
name: github-pages
61-
url: ${{ steps.deployment.outputs.page_url }}
62-
needs: build
63-
runs-on: ubuntu-latest
64-
steps:
6549
- name: Deploy to GitHub Pages
66-
id: deployment
67-
uses: actions/deploy-pages@v4
50+
uses: peaceiris/actions-gh-pages@v4
51+
with:
52+
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
53+
publish_dir: ./docs/.vitepress/dist
54+
external_repository: EFNext/efnext.github.io
55+
publish_branch: main
56+
user_name: 'github-actions[bot]'
57+
user_email: 'github-actions[bot]@users.noreply.github.com'
6858

EntityFrameworkCore.Projectables.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
5151
ProjectSection(SolutionItems) = preProject
5252
.github\workflows\build.yml = .github\workflows\build.yml
5353
.github\workflows\release.yml = .github\workflows\release.yml
54+
.github\workflows\docs.yml = .github\workflows\docs.yml
5455
EndProjectSection
5556
EndProject
5657
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EntityFrameworkCore.Projectables.CodeFixes", "src\EntityFrameworkCore.Projectables.CodeFixes\EntityFrameworkCore.Projectables.CodeFixes.csproj", "{1890C6AF-37A4-40B0-BD0C-7FB18357891A}"

0 commit comments

Comments
 (0)