-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
46 lines (39 loc) · 1.06 KB
/
azure-pipelines.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
trigger:
- dev
pool:
vmImage: 'ubuntu-latest'
variables:
- group: GitHubPATGroup
steps:
- script: |
cargo install trunk
rustup target add wasm32-unknown-unknown
displayName: Install tools
- script: trunk build --release
displayName: Build app
- task: CopyFiles@2
displayName: Copy files
inputs:
contents: |
dist/**
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts'
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/dist
artifactName: 'Dist'
- script: |
git config --global user.name "$NAME"
git config --global user.email "$EMAIL"
cd $(Build.ArtifactStagingDirectory)/dist
git init
git checkout -b master
git add -A
git commit -m "Create build $(Build.BuildId)"
git push -f https://[email protected]/Berrysoft/Berrysoft.github.io.git master
displayName: 'Publish to GitHub Pages'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
env:
PAT: $(GitHubPAT)
NAME: $(GitHubName)
EMAIL: $(GitHubEmail)