Skip to content

Commit

Permalink
fixed my guide
Browse files Browse the repository at this point in the history
  • Loading branch information
Moosyu committed Oct 4, 2024
1 parent fc24d09 commit 385b737
Showing 1 changed file with 110 additions and 15 deletions.
125 changes: 110 additions & 15 deletions src/pages/guides/lexiqqq_eleventy.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ date: 2024-10-03

this probably isnt efficient or good but it works, dm me on discord if you want to scream at me or make an issue on github if you want to make it good. anyways if you want to use this workflow that builds your 11ty project and puts the files from _site into lexiqqq just follow these very simple steps

1. make a folder in the root of your project called .github, then make another folder inside .github called workflows, inside workflows make a yml file, i call mine build.yml
# 1. folder setup:

make a folder in the root of your project called .github, then make another folder inside .github called workflows, inside workflows make a yml file, i call mine build.yml

```
project root/
Expand All @@ -19,9 +21,14 @@ project root/
└── build.yml
```

2. inside build.yml copy and paste this:
(project root is the folder that _site, node_modules, package.json etc are in.)

# 2. defining the workflow:

inside the build.yml file copy and paste this:

```yml
{% raw %}
name: Deploy to Lexiqqq

on:
Expand Down Expand Up @@ -58,45 +65,131 @@ jobs:
- name: Copy _site to Lexiqqq with SCP
run: |
scp -i ~/.ssh/private.key -o UserKnownHostsFile=~/.ssh/known_hosts -o StrictHostKeyChecking=no -r _site/* [email protected]:/home/YOURLEXIQQQUSERNAME/public_html/
{% endraw %}
```

3. inside that document replace "YOURLEXIQQQUSERNAME" with your lexiqqq username on the last line (your username is the name before .lexiqqq.com on your url)
# 3. configuring the workflow

inside that document replace "YOURLEXIQQQUSERNAME" with your lexiqqq username on the last line (your username is the name before .lexiqqq.com on your url)

4. now here it gets a little complicated, go into your github repo, go to settings, click the secrets and variables dropdown on the right and click actions. in the actions page you're going to want to click "New repository secret".
# 4. setup up github repo secrets

now here it gets a little complicated, go into your github repo, go to settings, click the secrets and variables dropdown on the right and click actions. in the actions page you're going to want to click "New repository secret".

![](https://i.imgur.com/3JxV4Eq.png)

5. in the new repository secret menu for for the name write LEXIQQQ_PRIVATE_KEY. for the secret you're going to want to open a terminal window, run this command (but replace [email protected] with your actual email, this is a comment that is associating the key with your email so you can identify it):
# 5. generating your ssh key

in the new repository secret menu for for the name write LEXIQQQ_PRIVATE_KEY. for the secret you're going to want to open a terminal window, run this command (but replace [email protected] with your actual email, the email bit is a comment that is associating the key with your email so you can identify it):

```bash
ssh-keygen -t ed25519 -C "[email protected]"
```

now just press enter when you are prompted with the storage location and a passphrase, just press enter for all of these without typing anything in.
press enter when you are prompted with the file name and a passphrase leaving them blank. you can still follow this tutorial (probably i havent tested it) if you add a passphrase but it might get more complicated and you'll probably have to modify the workflow, same with a file name.


# 6. copying your public key to lexiqqq (open the dropdown depending on your OS)

6. once you've done that run this command
<details>
<summary><p style="display: inline;">linux</p></summary>

run this command that copies your public key (specified with the .pub) to your lexiqqq server, make sure to add your lexiqqq username instead of just leaving it as "YOURLEXIQQQUSERNAME" before running this command!

```bash
ssh-copy-id -i ~/.ssh/id_ed25519.pub [email protected]
```

this is copying your public key (specified with the .pub) to your lexiqqq server, make sure to add your lexiqqq username instead of just leaving it as "YOURLEXIQQQUSERNAME" before running this command!
</details>

<details>
<summary><p style="display: inline;">mac</p></summary>

7. if you want to make sure this worked try running
if you're on mac you may need to run this first:

```bash
brew install ssh-copy-id
```
ssh -i ~/.ssh/id_ed25519 [email protected]

then run this command which copies your public key (specified with the .pub) to your lexiqqq server, make sure to add your lexiqqq username instead of just leaving it as "YOURLEXIQQQUSERNAME" before running this command!

```bash
ssh-copy-id -i ~/.ssh/id_ed25519.pub [email protected]
```

(this is untested, if youre on mac and this works please tell me!! if this doesnt work just use the windows option it should work universally)

</details>

<details>
<summary><p style="display: inline;">windows</p></summary>

run this in a terminal and copy its output:

```bash
cat ~/.ssh/id_ed25519.pub
```

it should ssh you into your lexiqqq account without a password prompt appearing
what you copied should look something like this:

```
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDbKm9EjflQkNtlb7vTud7XmMfObOlTFOupKtFHzrjJk [email protected]
```

8. last step!! if youre on linux(or maybe mac too) run
next ssh into lexiqqq in a terminal with this command:

```bash
ssh [email protected]
```

this should prompt you to enter your lexiqqq password, do it.

once you've logged run this:

```bash
mkdir -p ~/.ssh
```

then run

```bash
echo "YOUR_SSH_KEY" >> ~/.ssh/authorized_keys
```

(copy and paste the ssh key that you just copied to your clipboard into the YOUR_SSH_KEY spot)

then run

```bash
chmod 600 ~/.ssh/authorized_keys
```

and

```bash
chmod 700 ~/.ssh
```

this is giving authorized_keys read and write permissions and giving the ssh directory read, write and execute permissions.
</details>

# 7. (optional) verifying your ssh access

```bash
ssh -i ~/.ssh/id_ed25519 [email protected]
```

it should ssh you into your lexiqqq account without a password prompt appearing.

# 8. adding your private key to github secrets

this is the last step !! run:

```bash
cat ~/.ssh/id_ed25519
```

if not go to where your ssh keys were just saved to ( ~/.ssh by default on unix based or on windows i think its C:\Users\PUTYOURUSERNAMEHERE\.ssh), find the file "id_ed25519" NOT "id_ed25519.pub" and copy the contents, it should look something like:
the output should look something like:

```
-----BEGIN OPENSSH PRIVATE KEY-----
Expand All @@ -112,6 +205,8 @@ if not go to where your ssh keys were just saved to ( ~/.ssh by default on unix

![](https://i.imgur.com/tpaisrn.png)

then just press add scret
then just press add secret.

# 9. profit!!

9. profit!! that should be it, now any commits you make to the repo will auto update your lexiqqq site.
any changes you make to your github repo will be built and the contents of the build uploaded to your lexiqqq site !!

0 comments on commit 385b737

Please sign in to comment.