Skip to content

Fix workflow for uploading to Github Packages #2

Fix workflow for uploading to Github Packages

Fix workflow for uploading to Github Packages #2

Workflow file for this run

name: Build distributions
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Maven 3.9.5
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1
with:
maven-version: 3.9.5
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B install
- name: Upload Update Site
uses: actions/upload-artifact@v4
with:
name: update-site
path: releng/org.eclipse.epsilon.emc.rdf.updatesite/target/repository
- name: Deploy Maven artifact
run: mvn -B -f pom-plain.xml clean deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
upload-site:
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Download Update Site
uses: actions/download-artifact@v4
with:
name: update-site
path: _site/updates
- name: Create Github Pages Index
shell: bash
run: |
echo '<html><body>The <a href="updates">updates</a> folder has the emc-rdf update site.</body></html>' > _site/index.html
echo "<html><body>This is an Eclipse update site.</body></html>" > _site/updates/index.html
- name: Upload Github Pages Artifact
uses: actions/upload-pages-artifact@v3
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4