File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7676 name : ${{ matrix.artifact }}
7777 path : ${{ matrix.artifact }}.${{ matrix.ext }}
7878
79+ pages :
80+ needs : build
81+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
82+ runs-on : ubuntu-latest
83+ permissions :
84+ contents : read
85+ pages : write
86+ id-token : write
87+ environment :
88+ name : github-pages
89+ url : ${{ steps.deploy.outputs.page_url }}
90+
91+ steps :
92+ - uses : actions/download-artifact@v4
93+ with :
94+ pattern : 3code-*
95+ path : dl
96+ merge-multiple : true
97+
98+ - name : Assemble site
99+ run : |
100+ mkdir -p site/main
101+ cp dl/3code-linux-amd64.tar.gz site/main/
102+ cp dl/3code-macos-universal.tar.gz site/main/
103+ cp dl/3code-windows-amd64.zip site/main/
104+ cat > site/index.html <<EOF
105+ <!doctype html><meta charset=utf-8><title>3code main builds</title>
106+ <h1>3code main builds</h1>
107+ <p>Per-commit builds from <code>main</code> (commit ${GITHUB_SHA}).</p>
108+ <ul>
109+ <li><a href="main/3code-linux-amd64.tar.gz">3code-linux-amd64.tar.gz</a></li>
110+ <li><a href="main/3code-macos-universal.tar.gz">3code-macos-universal.tar.gz</a></li>
111+ <li><a href="main/3code-windows-amd64.zip">3code-windows-amd64.zip</a></li>
112+ </ul>
113+ EOF
114+
115+ - uses : actions/configure-pages@v5
116+
117+ - uses : actions/upload-pages-artifact@v3
118+ with :
119+ path : site
120+
121+ - id : deploy
122+ uses : actions/deploy-pages@v4
123+
79124 release :
80125 needs : build
81126 if : startsWith(github.ref, 'refs/tags/')
You can’t perform that action at this time.
0 commit comments