forked from actions/runner
-
-
Notifications
You must be signed in to change notification settings - Fork 17
100 lines (100 loc) · 4.33 KB
/
deploy-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
on:
push:
branches:
- main
pull_request:
jobs:
deploy:
# Allow one concurrent deployment
concurrency:
group: ${{ github.event_name == 'push' && 'pages' || github.run_id }}
cancel-in-progress: true
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
environment:
name: ${{ github.event_name == 'push' && 'github-pages' || '' }}
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
env:
BASE_URL: https://${{ github.repository_owner }}.github.io${{ github.repository_owner != github.event.repository.name && format('/{0}', github.event.repository.name) || '' }}
REPO_NAME: ${{ github.repository_owner != github.event.repository.name && format('{0}-{1}', github.repository_owner, github.event.repository.name) || github.repository_owner }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Setup YamlDotnetFork
run: |
git clone https://github.com/ChristopherHX/runner-server-lsp-YamlDotNet YamlDotNet
echo "YAML_DOTNET_FORK_PATH=$PWD/YamlDotNet/YamlDotNet/YamlDotNet.csproj" >> $GITHUB_ENV
- name: Build ExpandAzurePipelines
run: dotnet publish src/ExpandAzurePipelines -c Release --output out
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Build azure-pipelines-vscode-ext
run: |
npm install
dotnet workload install wasm-tools
npm run build
node_modules/.bin/vsce pack -o azure-pipelines-vscode-ext.vsix
node_modules/.bin/vsce pack --pre-release -o azure-pipelines-vscode-ext-pre-release.vsix
working-directory: src/azure-pipelines-vscode-ext
- name: Build runner-server-vscode
run: |
npm install
npm run build
node_modules/.bin/vsce pack -o runner-server-vscode.vsix
node_modules/.bin/vsce pack --pre-release -o runner-server-vscode-pre-release.vsix
working-directory: src/runner-server-vscode
- name: Build runner-server-web-vscode
run: |
npm install
dotnet workload install wasm-tools
npm run build
node_modules/.bin/vsce pack -o runner-server-web-vscode.vsix
node_modules/.bin/vsce pack --pre-release -o runner-server-web-vscode-pre-release.vsix
working-directory: src/runner-server-web-vscode
- name: Make layout
run: |
mkdir webapp
mv out/wwwroot webapp/ExpandAzurePipelines
mkdir -p webapp/azure-pipelines-vscode-ext
mv src/azure-pipelines-vscode-ext/build webapp/azure-pipelines-vscode-ext/
mv src/azure-pipelines-vscode-ext/dist webapp/azure-pipelines-vscode-ext/
mv src/azure-pipelines-vscode-ext/package.json webapp/azure-pipelines-vscode-ext/
mv src/azure-pipelines-vscode-ext/*.vsix webapp/azure-pipelines-vscode-ext/
mkdir -p webapp/runner-server-vscode
mv src/runner-server-vscode/*.vsix webapp/runner-server-vscode/
mkdir -p webapp/runner-server-web-vscode
mv src/runner-server-web-vscode/*.vsix webapp/runner-server-web-vscode/
- name: Upload vsix
uses: actions/upload-artifact@v4
with:
name: azure-pipelines-vscode-ext-pre-release
path: webapp/azure-pipelines-vscode-ext/azure-pipelines-vscode-ext-pre-release.vsix
- name: Upload vsix runner-server
uses: actions/upload-artifact@v4
with:
name: runner-server-vscode-pre-release
path: webapp/runner-server-vscode/runner-server-vscode-pre-release.vsix
- name: Upload vsix runner-server-web
uses: actions/upload-artifact@v4
with:
name: runner-server-web-vscode-pre-release
path: webapp/runner-server-web-vscode/runner-server-web-vscode-pre-release.vsix
- name: Setup Pages
if: github.event_name == 'push'
uses: actions/configure-pages@v3
- name: Upload artifact
if: github.event_name == 'push'
uses: actions/upload-pages-artifact@v1
with:
path: 'webapp'
- name: Deploy to GitHub Pages
if: github.event_name == 'push'
id: deployment
uses: actions/deploy-pages@v1