-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (50 loc) · 2.19 KB
/
ci.yml
File metadata and controls
54 lines (50 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: '10.x'
- name: Install ChromeDriver
run: |
CHROME_VERSION=$(google-chrome --version | cut -f 3 -d ' ' | cut -d '.' -f 1) \
&& CHROMEDRIVER_RELEASE=$(curl --location --fail --retry 3 http://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION}) \
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/chromedriver_linux64.zip "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_RELEASE/chromedriver_linux64.zip" \
&& cd /tmp \
&& unzip chromedriver_linux64.zip \
&& rm -rf chromedriver_linux64.zip \
&& sudo mv chromedriver /usr/local/bin/chromedriver \
&& sudo chmod +x /usr/local/bin/chromedriver \
&& chromedriver --version
- name: Install
run: |
npm install -g @angular/cli
npm install
# - name: Testing
# run: npm test --configuration=ci
- name: Build
run: ng build --prod --output-hashing=none --base-href=/devops-periodic/ && cat dist/devops-periodic/{runtime,polyfills,main}-es5.js > dist/devops-periodic/elements.js
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.SuperSecret }}
BRANCH: gh-pages # The branch the action should deploy to.
REPOSITORY_NAME: "phodal/devops-periodic"
FOLDER: dist/devops-periodic