1
+ # Simple workflow for deploying static content to GitHub Pages
2
+ name : Deploy Vue
3
+
4
+ on :
5
+ # Runs on pushes targeting the default branch
6
+ push :
7
+ branches : ["vueElectron","vue"]
8
+
9
+ # Allows you to run this workflow manually from the Actions tab
10
+ workflow_dispatch :
11
+
12
+ # Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
13
+ permissions :
14
+ contents : read
15
+ pages : write
16
+ id-token : write
17
+
18
+ # Allow one concurrent deployment
19
+ concurrency :
20
+ group : ' pages'
21
+ cancel-in-progress : true
22
+
23
+ jobs :
24
+ # Single deploy job since we're just deploying
25
+ deploy :
26
+ environment :
27
+ name : github-pages
28
+ url : ${{ steps.deployment.outputs.page_url }}
29
+ runs-on : ubuntu-latest
30
+ steps :
31
+ - name : Set up Node
32
+ uses : actions/setup-node@v4
33
+ with :
34
+ node-version : 21
35
+ # cache: 'npm config --package-lock'
36
+ - name : Checkout
37
+ uses : actions/checkout@v4
38
+ - name : Build
39
+ run : npm run build
40
+ - name : Auto Enable GitHub Pages
41
+ id : pages
42
+ uses : actions/github-script@v7
43
+ with :
44
+ script : |
45
+ return (await github.rest.repos.createPagesSite({
46
+ owner: context.repo.owner,
47
+ repo: context.repo.repo,
48
+ })).html_url;
49
+ - name : Setup Pages
50
+ uses : actions/configure-pages@v4
51
+ with :
52
+ enablement : true
53
+ token : ${{ secrets.GITHUB_TOKEN }}
54
+ - name : Build with Jekyll
55
+ uses : actions/jekyll-build-pages@v1
56
+ with :
57
+ source : .
58
+ destination : _site
59
+ - name : Upload artifact
60
+ uses : actions/upload-pages-artifact@v3
61
+ - name : Deploy to GitHub Pages
62
+ id : deployment
63
+ uses : actions/deploy-pages@v4
0 commit comments