setup github actions
This commit is contained in:
parent
5773cc2298
commit
e8b95e32ba
61
.github/workflows/ci.yml
vendored
Normal file
61
.github/workflows/ci.yml
vendored
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '12.x'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Upload artifact
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
path: dist
|
||||||
|
|
||||||
|
preview:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
steps:
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
|
||||||
|
- name: Deploy preview
|
||||||
|
uses: netlify/actions/cli@master
|
||||||
|
env:
|
||||||
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||||
|
with:
|
||||||
|
args: deploy --dir=.
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
steps:
|
||||||
|
- name: Download artifact
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: dist
|
||||||
|
|
||||||
|
- name: Deploy site
|
||||||
|
uses: netlify/actions/cli@master
|
||||||
|
env:
|
||||||
|
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
|
||||||
|
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
|
||||||
|
with:
|
||||||
|
args: deploy --dir=. --prod
|
@ -1,36 +0,0 @@
|
|||||||
image: node:13-alpine
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- build
|
|
||||||
- deploy-dev
|
|
||||||
- deploy-prod
|
|
||||||
|
|
||||||
variables:
|
|
||||||
NETLIFY_SITE_ID: airsonic
|
|
||||||
|
|
||||||
build:
|
|
||||||
stage: build
|
|
||||||
script:
|
|
||||||
- export VUE_APP_VERSION=$CI_COMMIT_SHORT_SHA
|
|
||||||
- yarn install
|
|
||||||
- yarn build
|
|
||||||
artifacts:
|
|
||||||
paths:
|
|
||||||
- dist
|
|
||||||
|
|
||||||
deploy dev:
|
|
||||||
stage: deploy-dev
|
|
||||||
script:
|
|
||||||
- npm i -g netlify-cli
|
|
||||||
- netlify deploy --dir dist --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN
|
|
||||||
|
|
||||||
deploy production:
|
|
||||||
stage: deploy-prod
|
|
||||||
environment:
|
|
||||||
name: production
|
|
||||||
url: https://airsonic.netlify.com
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
script:
|
|
||||||
- npm i -g netlify-cli
|
|
||||||
- netlify deploy --dir dist --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN --prod
|
|
@ -1,6 +1,6 @@
|
|||||||
# Airsonic Web Client
|
# Airsonic Web Client
|
||||||
|
|
||||||
[](https://gitlab.com/tamland/airsonic-ui/pipelines)
|
[](https://github.com/tamland/airsonic-frontend/actions)
|
||||||
|
|
||||||
Modern responsive web frontend for [Airsonic](https://github.com/airsonic/airsonic). It's currently based on the [Subsonic API](http://www.subsonic.org/pages/api.jsp) and should work with other backends implementing this API as well.
|
Modern responsive web frontend for [Airsonic](https://github.com/airsonic/airsonic). It's currently based on the [Subsonic API](http://www.subsonic.org/pages/api.jsp) and should work with other backends implementing this API as well.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user