Skip to content

Commit

Permalink
Merge branch '231-website-overhaul' into 237-create-landingpage
Browse files Browse the repository at this point in the history
  • Loading branch information
lxgr-linux committed Nov 30, 2023
2 parents 6624458 + a883185 commit 04197c7
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
workflow_dispatch:



jobs:
run_pull:
name: run pull
runs-on: ubuntu-latest
env:
# Setting an environment variable with the value of a configuration variable
LABEL: ${{
contains(github.event.pull_request.labels.*.name, 'deploy_5173') && 'deploy_5173' ||
(contains(github.event.pull_request.labels.*.name, 'deploy_5174') && 'deploy_5174' || 'none')
}}

steps:
- name: exit
if: ${{ env.LABEL == 'none' }}
run: |
exit 1
- name: install ssh keys
# check this thread to understand why its needed:
# https://stackoverflow.com/a/70447517
run: |
echo env.tag_name
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.LXGR_DEPLOY_PRIV }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.LXGR_HOST }} > ~/.ssh/known_hosts
- name: connect and pull
run: ssh ${{ secrets.LXGR_USER }}@${{ secrets.LXGR_HOST }} "cd ~/$LABEL && git fetch && git checkout ${{ github.event.pull_request.head.ref }} && git pull && npm i && npm run build && chgrp -R www-data ~/$LABEL && exit"
- name: cleanup
run: rm -rf ~/.ssh
16 changes: 16 additions & 0 deletions src/views/CardCreatorPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,21 @@ export default {
}
}
// if an ability was created, but it has no effect, then this should be fixed
if (newModel.Abilities.length > 0) {
let effectsList = R.flatten(R.map(
x => R.values(R.pluck("Effects", x)),
newModel.Abilities))
if (R.any(y => y === undefined, effectsList)) {
this.notifyFail(
"Useless Ability",
"Card has an Ability, which does not do anything. Please add an Effect to the Ability."
);
return;
}
}
// check if the old Keywords and RulesTexts should be restored
let checkZeroAmount = () => {
return (this.model.AdditionalCost.SacrificeCost && this.model.AdditionalCost.SacrificeCost.Amount == 0) ||
Expand All @@ -1211,6 +1226,7 @@ export default {
newModel.image = this.model.image
newModel.balanceAnchor = this.model.balanceAnchor
// many characters will not make it into the blockchain, so here we check if all is valid ASCII
let checkASCII = (string, origin) => {
string.split('').forEach(char => {
if (!isASCII(char)) {
Expand Down

0 comments on commit 04197c7

Please sign in to comment.