Skip to content

Commit

Permalink
fix: gha update workflow versions for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldtse committed Feb 6, 2025
1 parent a64c01a commit 1003d85
Showing 1 changed file with 5 additions and 24 deletions.
29 changes: 5 additions & 24 deletions .github/workflows/build_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- main
# - staging
pull_request:
repository_dispatch:
workflow_dispatch:
Expand All @@ -22,50 +21,32 @@ concurrency:
cancel-in-progress: false

jobs:
# set_environment:
# outputs:
# my_env: ${{ steps.setenv.outputs.my_env }}
# my_url: ${{ steps.setenv.outputs.my_url }}
# runs-on: ubuntu-latest
# steps:
# - id: setenv
# run: |
# if [ "$GITHUB_REF" = "refs/heads/main" ]
# then
# echo "::set-output name=my_env::production"
# echo "::set-output name=my_url::https://www.tebako.org"
# elif [ "$GITHUB_REF" = "refs/heads/staging" ]
# then
# echo "::set-output name=my_env::staging"
# echo "::set-output name=my_url::https://staging-www.tebako.org"
# fi

build:
runs-on: ubuntu-latest
# needs: [set_environment]
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
ruby-version: '3.3'
bundler-cache: true
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3

- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: JEKYLL_LOG_LEVEL=debug bundle exec jekyll build --verbose --trace --baseurl "${{ steps.pages.outputs.base_path }}"
run: bundle exec jekyll build --verbose --trace --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
JEKYLL_LOG_LEVEL: debug

- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
Expand All @@ -78,4 +59,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4

0 comments on commit 1003d85

Please sign in to comment.