Skip to content

Commit 436b585

Browse files
committed
CI: update publication flow.
1 parent 1fd5f09 commit 436b585

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/main.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,15 @@ jobs:
3838
- name: Disable Jekyll
3939
run: |
4040
touch dist/.nojekyll
41-
- name: Publish artifact to gh-pages branch in this repository
41+
- if: ${{ github.repository != 'amaranth-lang/playground' }}
42+
name: Publish artifact to gh-pages branch in this repository
4243
uses: JamesIves/github-pages-deploy-action@releases/v4
4344
with:
4445
folder: dist/
4546
branch: ${{ github.repository == 'amaranth-lang/playground' && 'pages' || 'gh-pages' }}
4647
single-commit: true
48+
- if: ${{ github.repository == 'amaranth-lang/playground' }}
49+
name: Publish artifact to https://amaranth-lang.org/play/
50+
run: |
51+
set -o pipefail
52+
tar c * | zstd -T0 -1 | curl https://amaranth-lang.org/play/ -X PUT -H "Authorization: Pages ${{ secrets.GREBEDOC_TOKEN }}" -H "Content-Type: application/x-tar+zstd" -T -

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ This will start a local server at http://localhost:8010/ (or a subsequent port i
3333

3434
If you are using Visual Studio Code, you can also use <kbd>Shift</kbd>+<kbd>Ctrl</kbd>+<kbd>B</kbd> instead.
3535

36-
## Deployment
36+
## Publication
3737

38-
The latest commit in the `main` branch is deployed to the `gh-pages` branch, except in the `amaranth-lang/playground` repository. (This lets you show the changes made in your fork to others without them building the application on their machine.)
38+
Except in the `amaranth-lang/playground` repository, the latest commit in the `main` branch is built and the result is published to the `gh-pages` branch. (This lets you show the changes made in your fork to others without them building the application on their machine.)
3939

40-
The latest commit in the `live` branch is deployed to the `main` branch of `amaranth-lang/amaranth-lang.github.io`, which is published at https://amaranth-lang.org/play/. To publish latest changes from the `main` branch, run `git push origin main:live`.
40+
Only in the `amaranth-lang/playground` repository, the latest commit in the `main` branch is built and the result is published to the `pages` branch, which in turn is published at https://amaranth-lang.org/play/ via a webhook.
4141

4242
## License
4343

0 commit comments

Comments
 (0)