Develop #529
Workflow file for this run
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: Pull request created | |
on: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo apt-get install -y libkrb5-dev | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Install node_modules | |
run: npm install | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm run test | |
test: | |
runs-on: wgd-dev | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js 18.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Build hugo docs | |
run: | | |
docker run \ | |
-v "${GITHUB_WORKSPACE}/hugo:/site" \ | |
-v "${GITHUB_WORKSPACE}/website:/website" \ | |
-v "/var/www/test.wikigdrive.com:/dist/hugo" \ | |
--env CONFIG_TOML="/site/config/_default/config.toml" --env BASE_URL="https://test.wikigdrive.com" \ | |
wgd-action-runner:develop /steps/step_render_hugo | |
- name: Copy index for vite | |
run: mkdir -p dist/hugo && cp -rf /var/www/test.wikigdrive.com/* dist/hugo | |
- name: Build | |
run: docker build -t wikigdrive-test --build-arg "GIT_SHA=${GITHUB_SHA}" . | |
- name: Stop | |
run: docker stop wikigdrive-test | |
continue-on-error: true | |
- name: Remove | |
run: docker rm wikigdrive-test | |
continue-on-error: true | |
- name: Start | |
run: docker run -t -v wikiGDriveExample:/data -v /home/githubactions/wikigdrive/service_account.json:/service_account.json -v "/var/www/dev.wikigdrive.com:/usr/src/app/dist/hugo" wikigdrive-test wikigdrive --service_account /service_account.json --share_email [email protected] --workdir /data pull 0AIkOKXbzWCtSUk9PVA |