Skip to content

Commit

Permalink
Update deprecated build steps
Browse files Browse the repository at this point in the history
Use newer Github Actions runners, actions, and replace docker-compose
with docker compose (v2)
  • Loading branch information
matiasgarciaisaia committed Sep 17, 2024
1 parent e8eb1f4 commit 3796c36
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/import-new-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ on:
- cron: '0 */6 * * *'
jobs:
import_resources:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Run resource import script
run: ./_scripts/import_resources.py
- name: Create pull request
uses: peter-evans/create-pull-request@v2
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Import new resources.
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/preview-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on:

jobs:
pull_push_preview:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/cache/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -32,8 +32,8 @@ jobs:
- name: Build Jekyll site
run: |
mv docker-compose.ci.yml docker-compose.override.yml
docker-compose run --rm web /bin/bash -c "(bundle check || bundle install --jobs=3) && bundle exec jekyll build"
- uses: amondnet/vercel-action@v19
docker compose run --rm web /bin/bash -c "(bundle check || bundle install --jobs=3) && bundle exec jekyll build"
- uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.ZEIT_TOKEN }}
zeit-team-id: ${{ secrets.ZEIT_TEAM_ID }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:

jobs:
build_and_deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/cache/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Build Jekyll site
run: |
mv docker-compose.ci.yml docker-compose.override.yml
docker-compose run --rm web /bin/bash -c "(bundle check || bundle install --jobs=3) && bundle exec jekyll build"
docker compose run --rm web /bin/bash -c "(bundle check || bundle install --jobs=3) && bundle exec jekyll build"
- uses: amondnet/now-deployment@v2
with:
zeit-token: ${{ secrets.ZEIT_TOKEN }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:

jobs:
build_and_deploy:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ~/cache/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
Expand All @@ -19,25 +19,25 @@ jobs:
- name: Build Jekyll site
run: |
mv docker-compose.ci.yml docker-compose.override.yml
docker-compose run --rm web /bin/bash -c "(bundle check || bundle install --jobs=3) && JEKYLL_ENV=production bundle exec jekyll build"
docker compose run --rm web /bin/bash -c "(bundle check || bundle install --jobs=3) && JEKYLL_ENV=production bundle exec jekyll build"
- name: Publish to gh-pages branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
run: ./_scripts/push-to-gh-pages.sh
- name: Upload English content
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: english-content
path: build/i18n-en.json

publish_to_lokalise:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: build_and_deploy
steps:
- name: Download English content
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: english-content
- name: Push English content to Lokalise
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,5 @@ We're trying to grow this documentation as fast as we can. This website is based
#### Running the project locally

1. Clone the project.
1. Run `docker-compose up`.
1. Run `docker compose up`.
1. In a browser, go to `http://localhost:4000`. The site should be running there.
2 changes: 1 addition & 1 deletion import-translations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
#
# This command will generate the _translations/<LANG>.json files and the _content/<LANG>

docker-compose run \
docker compose run \
--rm web \
/bin/bash -c "(bundle check || bundle install --jobs=3) && ruby import_language.rb $1 $2"

0 comments on commit 3796c36

Please sign in to comment.