diff --git a/.github/workflows/update-site.yml b/.github/workflows/update-site.yml new file mode 100644 index 0000000..3c3e99c --- /dev/null +++ b/.github/workflows/update-site.yml @@ -0,0 +1,56 @@ +name: Build update site + +on: + push: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-22.04 + permissions: + contents: read + 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 + 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 'The updates folder has the emc-rdf update site.' > _site/index.html + echo "This is an Eclipse update site." > _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