Skip to content

Update repository structure for version 0.5.0.0 with proper manifest … #5

Update repository structure for version 0.5.0.0 with proper manifest …

Update repository structure for version 0.5.0.0 with proper manifest … #5

Workflow file for this run

name: Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'repository/**'
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
run: |
# Create artifact directory
mkdir -p /tmp/artifact
# Copy repository directory to artifact directory
cp -r repository/* /tmp/artifact/
# Create artifact
cd /tmp
tar --dereference --hard-dereference --directory artifact -cf artifact.tar .
# Upload artifact
echo "::group::Upload artifact"
UPLOAD_URL=$(curl -sL -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/${{ github.repository }}/pages/artifacts | jq -r '.html_url')
curl -sL -X PUT -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ github.token }}" -H "X-GitHub-Api-Version: 2022-11-28" -H "Content-Type: application/octet-stream" --data-binary @artifact.tar "$UPLOAD_URL"
echo "::endgroup::"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4