Skip to content

Commit

Permalink
Added deployment through actions
Browse files Browse the repository at this point in the history
  • Loading branch information
atteggiani committed Nov 8, 2023
1 parent 9dd8b27 commit ff1134b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 28 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/create_pr_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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 +43,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
8 changes: 7 additions & 1 deletion .github/workflows/deploy_development_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,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
30 changes: 8 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,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
12 changes: 9 additions & 3 deletions .github/workflows/remove_pr_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,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 +59,12 @@ jobs:
with:
header: pr-preview
number: ${{ github.event.number }}
message: "\
message: |
PR Preview
:---:
🛬 Preview removed because the pull request was closed.
${{ env.DATE }}
"

0 comments on commit ff1134b

Please sign in to comment.