Skip to content

Commit

Permalink
Merge pull request #65 from italia/publish-on-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
balanza authored Jul 11, 2023
2 parents e5a6d5e + 582afd7 commit eb8a1f8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ name: gh-pages

on:
push:
tags: [ "*" ]
branches: ["versione-corrente"]
paths-ignore:
- README.md
- CONTRIBUTING.md
- LICENSE.md
- .gitignore
pull_request:
branches: [ "*" ]
branches: ["*"]
paths-ignore:
- README.md
- CONTRIBUTING.md
- LICENSE.md
- .gitignore
release:
types:
- created
- edited

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -45,10 +48,17 @@ jobs:
- name: Build branch
run: |-
[[ "$GITHUB_REF" != "versione_corrente" ]] && P="${GITHUB_REF}/" || P="" # note the trailing slash
echo "Publish on $P sub path"
sphinx-build -b html docs/it/ html/$Pit
sphinx-build -b html docs/en/ html/$Pen
if [[ "$GITHUB_REF" = /refs/tags/* ]]; then
replace=/refs/tags/
TAG=$(echo "$GITHUB_REF" | sed "s/\/refs\/tags\///")
SUBPATH="v$TAG/" # note the trailing slash
else
SUBPATH="${GITHUB_HEAD_REF}/" # note the trailing slash
fi
echo "Publish on $SUBPATH sub path"
sphinx-build -b html docs/it/ html/$SUBPATHit
sphinx-build -b html docs/en/ html/$SUBPATHen
# Runs a single command using the runners shell
- name: Create GH page index
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ The stable release in different languages is published at the link below:
- [English](https://italia.github.io/eidas-it-wallet-docs/en)
- [Italian](https://italia.github.io/eidas-it-wallet-docs/it)

### Preview of a branch

Preview of other branches can be navigated by adding the branch name in the webpath, as follows:

- https://italia.github.io/eidas-it-wallet-docs/trust-model/en

### Preview of released versions

Released versions can be navigated by adding the tag in the webpath leaded by a _v_, as follows:

- https://italia.github.io/eidas-it-wallet-docs/v0.4.0/en


## Documentation

Expand Down Expand Up @@ -74,6 +82,8 @@ Furthermore, this project uses the git *branches* and *tags* in the following wa
* The [release page](https://github.com/italia/publiccode.yml/releases) of
GitHub contains all the released versions of the standard. For the sake of coherence, the *releases* are made according to the tag names.

Each time a release is created or edited, a preview is built based on the tag the release refers to. See [the preview section](preview-of-released-versions) for more.

## How to contribute

Feel free to open [Pull Requests and to present a problem with an Issue](CONTRIBUTING.md).
Expand Down

0 comments on commit eb8a1f8

Please sign in to comment.