Add CI/CD #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish graffiti | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: | |
branches: | |
- "master" | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build-server: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- run: make server | |
- name: Upload Artifact | |
uses: actions/[email protected] | |
with: | |
name: graffiti_server.py | |
path: out/* | |
build-jeb: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- run: make jeb | |
- name: Upload Artifact | |
uses: actions/[email protected] | |
with: | |
name: graffiti_for_jeb.zip | |
path: out/* | |
build-vscode: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
- run: make vscode | |
- name: Upload Artifact | |
uses: actions/[email protected] | |
with: | |
name: graffiti_server.py | |
path: out/* | |
build-opengrok-sourcegraph: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
- run: make opengrok_sourcegraph | |
- name: Upload Artifact | |
uses: actions/[email protected] | |
with: | |
name: graffiti_for_opengrok_sourcegraph.zip | |
path: out/* | |
# publish_web: | |
# runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
# needs: build | |
# env: | |
# VERSION: $(cat version.txt) | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v2 | |
# - name: Setup Pages | |
# uses: actions/configure-pages@v5 | |
# - name: Download web frontend | |
# uses: actions/download-artifact@v4 | |
# with: | |
# path: /tmp | |
# name: graffiti_v${{ env.VERSION }}_frontend_web_with_deps.zip | |
# - name: Unzip web frotnend | |
# run: unzip /tmp/graffiti_v${{ env.VERSION }}_frontend_web_with_deps.zip | |
# - name: Upload artifact | |
# uses: actions/upload-pages-artifact@v3 | |
# with: | |
# path: /tmp/graffiti_v${{ env.VERSION }}_frontend_web_with_deps/ | |
# - name: Deploy to GitHub Pages | |
# id: deployment | |
# uses: actions/deploy-pages@v4 |