Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for GitHub pages deployment through actions #606

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/create_pr_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
- reopened
- synchronize

permissions:
contents: write
pages: write
id-token: write

concurrency:
group: preview-${{ github.event.number }}
cancel-in-progress: true
Expand All @@ -17,7 +22,7 @@ env:
TARGET_BRANCH: gh-pages

jobs:
build-and-deploy-preview:
build-and-deploy-pr-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -43,7 +48,13 @@ jobs:
commit-message: Deploy preview for PR ${{ env.PR }} 🛫
force: false

# - name: Deploy to Github pages
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: website

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2

- name: Get date
run: echo "DATE=$(date '+%Y-%m-%d %H:%M %Z')" >> $GITHUB_ENV
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/deploy_development_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

permissions:
contents: write
pages: write
id-token: write

concurrency:
group: deploy-development
cancel-in-progress: true
Expand Down Expand Up @@ -42,4 +47,10 @@ jobs:
commit-message: Deploy development website. 🛫
force: false

# - name: Deploy to Github pages
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: website

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2
32 changes: 10 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

permissions:
contents: write
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
Expand Down Expand Up @@ -43,25 +45,11 @@ jobs:
clean-exclude: |
pr-preview/
development_website/

# deploy:
# needs: build
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# ref: 'gh-pages'
# - name: Setup Pages
# uses: actions/configure-pages@v3
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v2
# with:
# # Upload entire repository
# path: '.'
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v2

- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: website

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2
17 changes: 14 additions & 3 deletions .github/workflows/remove_pr_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
types:
- closed

permissions:
contents: write
pages: write
id-token: write

concurrency:
group: preview-${{ github.ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -43,7 +48,13 @@ jobs:
git commit -m "Deleted '${{ env.TARGET_FOLDER }}' folder."
git push origin ${{ env.TARGET_BRANCH }}

# - name: Deploy to Github-pages
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: '.'

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2

- name: Get date
run: echo "DATE=$(date '+%Y-%m-%d %H:%M %Z')" >> $GITHUB_ENV
Expand All @@ -53,12 +64,12 @@ jobs:
with:
header: pr-preview
number: ${{ github.event.number }}
message: "\
message: |
PR Preview

:---:

🛬 Preview removed because the pull request was closed.

${{ env.DATE }}
"

2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ hide:
<h1 class="homepage"></h1>
<div class="introduction">
<div>
<div>Welcome to ACCESS-Hive!</div>
<div>Welcome to ACCESS-Hive!!</div>
<div>The open portal for the ACCESS user community, hosted by <a href="https://www.access-nri.org.au/" target="_blank">ACCESS-NRI</a></div>
</div>
<div>
Expand Down
Loading