Skip to content

Commit

Permalink
use artifacts between files
Browse files Browse the repository at this point in the history
  • Loading branch information
JJWTimmer committed Oct 22, 2023
1 parent f9b6cc7 commit db514aa
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 9 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/base-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
workflow_call:

jobs:
website:
name: Build the Rascal website
prepare-sources:
name: Prepare the website sources
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
steps:
- name: Clone
uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
Expand All @@ -28,4 +31,15 @@ jobs:

# Copy docs from dependent projects, run tutor on local courses folder and copy results into docs and static/assets
- name: Run rascal-tutor and reuse libraries
run: MAVEN_OPTIONS="-Xss256m -Xmx3G" mvn -B clean package -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -Dwebdriver.chrome.browser=`which chrome`
run: MAVEN_OPTIONS="-Xss256m -Xmx3G" mvn -B clean package -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -Dwebdriver.chrome.browser=`which chrome`

- uses: actions/upload-artifact@v3
with:
name: sources
path: |
.
!target/
!.git/
!.github/
!.vscode
!META-INF
15 changes: 12 additions & 3 deletions .github/workflows/pr-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,24 @@ on:

jobs:
website-pr:
name: Build the Rascal website
name: Sanity check the Rascal website
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
# Checkout only the workflow folder for this commit (else it uses main branch)
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
filter: '.github'

# Do the base actions
# Do the base actions
- uses: ./.github/base-jobs.yml

# Download prepared sources from base
- name: Download sources
uses: actions/download-artifact@v3
with:
name: sources

# Do a dummy build to see if there are errors
- name: Install dependencies
run: yarn install --frozen-lockfile
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/website-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,24 @@ on:

jobs:
website:
name: Build the Rascal website
name: Deploy the Rascal website
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
# Checkout only the workflow folder for this commit (else it uses main branch)
- name: Clone
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
filter: '.github'

# Do the base actions
- uses: ./.github/base-jobs.yml

# Download prepared sources from base
- name: Download sources
uses: actions/download-artifact@v3
with:
name: sources

# Production deploy
- name: Netlify Deploy
uses: jsmrcaga/[email protected]
Expand Down

0 comments on commit db514aa

Please sign in to comment.