fix(gha): trailing slash #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: static | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
static: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# need entire history | |
fetch-depth: 0 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: install pgit | |
run: | | |
go install github.com/picosh/pgit@latest | |
- name: generate site | |
run: | | |
pgit \ | |
--out ./public \ | |
--label pgit \ | |
--desc "a command line sentence tokenizer" \ | |
--clone-url "https://github.com/neurosnap/sentences.git" \ | |
--home-url "https://git.erock.io" \ | |
--revs main | |
- name: Set outputs | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: publish to pgs | |
uses: picosh/pgs-action@v3 | |
with: | |
user: erock | |
key: ${{ secrets.PRIVATE_KEY }} | |
src: './public/' | |
project: "git-sentences-${{ steps.vars.outputs.sha_short }}" | |
promote: "git-sentences" | |
retain: "git-sentences-" |