You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/drivers/filesystem.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
# Filesystem Driver
2
2
3
-
The Filesystem Driver is the default (and only!) driver that we ship with. It stores all of your built assets as a `.zip` on a filesystem of your choosing.
3
+
The Filesystem Driver is the default driver that we ship with. It stores all of your built assets as a `.zip` on a filesystem of your choosing.
4
4
5
5
6
6
## Configuration
7
7
8
8
If you'd like to change the configuration, you can do so in `airdrop.php`.
The GitHub Actions driver works as a part of your GitHub Workflows to cache built assets from run to run, even across branches.
4
+
5
+
When using the GitHub driver, there is _no need_ for a remote disk anywhere. Instead, we rely on the [Cache Action](https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows) to cache the built files for us.
6
+
7
+
## Configuration
8
+
9
+
The GitHub driver is an extension of the Filesystem driver so much of the configuration is the same, although fewer items are needed.
10
+
11
+
config/airdrop.php{.filename}
12
+
```php
13
+
[
14
+
'drivers' => [
15
+
'github' => [
16
+
// Use in conjunction with the Cache step in GitHub Actions.
`local_tmp_directory` is a place that Airdrop can use to create the `.zip` file before it is uploaded. This needs to match that path that you put in your `[workflow].yml` file.
33
+
34
+
`skip_file` is the file we referenced in the [deploying](/deploying) section. It's used as a signal to other processes that the built files have been successfully restored, and they do not need to be built again.
35
+
36
+
## GitHub Workflow Configuration
37
+
38
+
There are a couple steps you'll need to add to your GitHub Workflow to take advantage of the asset caching.
39
+
40
+
The first step is to calculate the hash of the inputs and save it in the environment for the cache step to use:
This command is going to run `php artisan airdrop:hash` to calculate the hash of all the inputs, and then it is going to store it as an environment variable named `AIRDROP_HASH`. This allows the cache step to look for the right key.
49
+
50
+
The next step you'll need to add is the cache step:
This step will cache the built zip file from Airdrop, and save it for up to seven days, per GitHub's [usage limits](https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy). (Remember that if a cache misses, your app will simply rebuild the assets!)
0 commit comments