Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigot committed Dec 5, 2024
1 parent f92b2cf commit 0da760d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 52 deletions.
8 changes: 0 additions & 8 deletions .github/actions/deploy/Dockerfile

This file was deleted.

19 changes: 0 additions & 19 deletions .github/actions/deploy/action.yml

This file was deleted.

44 changes: 20 additions & 24 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,25 @@ jobs:
steps:
- name: Checkout master
uses: actions/checkout@v4
with: { fetch-depth: 0 }
- name: Checkout gh-pages
run: git worktree add -B gh-pages public remotes/origin/gh-pages
- name: Clean previous
run: |
find public -mindepth 1 -maxdepth 1 '!' -name .git -exec rm -rf '{}' '+'
- name: Build site
uses: pdidev/pdidev.github.io/.github/actions/deploy@main
with:
output-directory: public
gitlab-url: https://gitlab.maisondelasimulation.fr
project-name: pdidev%2Fpdi
- name: Add static data
run: |
find data -mindepth 1 -maxdepth 1 -exec cp -r '{}' public ';'
- name: Add sitemap
run: |
./gen_sitemap public
- name: Push
run: |
cd public
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@noreply.example.com"
git add -A .
git commit -a -m "Update to match ${GITHUB_SHA} by ${GITHUB_EVENT_NAME} ${GITHUB_RUN_NUMBER}"
git push -f
export CI_PAGES_TOKEN="${{secrets.GITHUB_TOKEN}}"
./generate _site https://gitlab.maisondelasimulation.fr pdidev%2Fpdi
find data -mindepth 1 -maxdepth 1 -exec cp -r '{}' _site ';'
./gen_sitemap _site
- name: Upload page artifact
uses: actions/upload-pages-artifact@v3
publish:
needs: aggregate
if: "github.event_name != 'pull_request'"
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
1 change: 0 additions & 1 deletion .github/actions/deploy/entrypoint.sh → generate
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ then
fi

DEPLOY_DIR="${1}"
cd "${GITHUB_WORKSPACE}"
mkdir -p "${DEPLOY_DIR}"
cd "${DEPLOY_DIR}"
DEPLOY_DIR="${PWD}"
Expand Down

0 comments on commit 0da760d

Please sign in to comment.