Skip to content

Create gh action #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Pull request

on:
push:
branches:
- master

jobs:
Deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Run npm install
run: npm ci

# After the site is built, we delete the old docs folder,
# add CNAME file to dist folder, and rename it to docs.
- name: Build
run: |
npm run build
echo "chooser-beta.creatovecommons.org" > "./dist/CNAME"
rm -r -f "./docs"
mv -f -v "./dist" "./docs"

- name: Commit changes
uses: EndBug/add-and-commit@v4
with:
author_name: obulat
author_email: obulat@gmail.com
message: "Publish site"
add: "./docs"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Push

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Run npm install
run: npm ci

- name: Lint
run: npm run lint

- name: Test
run: npm run test:unit
env:
CI: true
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exports[`LicenseDetailsCard.vue Check if the LicenseDetailsCard.vue component ha
</h3>
<h4 class="vocab b-header"><a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=ccchooser" class="license-name">
Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
<a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=ccchooser" target="_blank" rel="noopener noreferrer" class="photo-license-icons"><img alt="CC icon" title="CC icon" src="../assets/license-icons/cc_icon.svg" class="photo-license-icon"> <img alt="by icon" title="by icon" src="[object Object]" class="photo-license-icon"><img alt="sa icon" title="sa icon" src="[object Object]" class="photo-license-icon"></a></a></h4>
<a href="https://creativecommons.org/licenses/by-sa/4.0/?ref=ccchooser" target="_blank" rel="noopener noreferrer" class="photo-license-icons"><img alt="CC icon" title="CC icon" src="../assets/license-icons/cc.svg" class="photo-license-icon"> <img alt="by icon" title="by icon" src="[object Object]" class="photo-license-icon"><img alt="sa icon" title="sa icon" src="[object Object]" class="photo-license-icon"></a></a></h4>
<p class="chooser-selected-description"><b>CC-BY-SA</b>
license-details-card.full-description.cc-by-sa
</p>
Expand All @@ -17,8 +17,8 @@ exports[`LicenseDetailsCard.vue Check if the LicenseDetailsCard.vue component ha
</span></li>
<li class="license-list-item sa"><span class="readable-string"><b>SA:</b>
license-details-card.item-description.sa
</span></li>
</span></ul>
</span></li></span>
</ul>
</section>
</div>
`;
Loading